From f98e6380f15c68a052e7ccb03b123b6eb91474ea Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 13 Aug 2014 03:14:34 +0100 Subject: [PATCH] add in whitespace after copyright statements to improve legibility --- synapse/__init__.py | 1 + synapse/api/__init__.py | 1 + synapse/api/auth.py | 1 + synapse/api/constants.py | 1 + synapse/api/errors.py | 1 + synapse/api/events/__init__.py | 1 + synapse/api/events/factory.py | 1 + synapse/api/events/room.py | 1 + synapse/api/notifier.py | 1 + synapse/api/streams/__init__.py | 1 + synapse/api/streams/event.py | 1 + synapse/app/__init__.py | 1 + synapse/app/homeserver.py | 2 +- synapse/crypto/__init__.py | 1 + synapse/crypto/config.py | 1 + synapse/crypto/keyclient.py | 1 + synapse/crypto/keyserver.py | 1 + synapse/crypto/resource/__init__.py | 1 + synapse/crypto/resource/key.py | 1 + synapse/federation/__init__.py | 1 + synapse/federation/handler.py | 1 + synapse/federation/pdu_codec.py | 1 + synapse/federation/persistence.py | 1 + synapse/federation/replication.py | 1 + synapse/federation/transport.py | 1 + synapse/federation/units.py | 1 + synapse/handlers/__init__.py | 1 + synapse/handlers/_base.py | 1 + synapse/handlers/directory.py | 1 + synapse/handlers/events.py | 1 + synapse/handlers/federation.py | 1 + synapse/handlers/login.py | 1 + synapse/handlers/presence.py | 1 + synapse/handlers/profile.py | 1 + synapse/handlers/register.py | 1 + synapse/handlers/room.py | 1 + synapse/http/__init__.py | 1 + synapse/http/client.py | 1 + synapse/http/endpoint.py | 1 + synapse/http/server.py | 1 + synapse/rest/__init__.py | 1 + synapse/rest/base.py | 1 + synapse/rest/directory.py | 1 + synapse/rest/events.py | 1 + synapse/rest/im.py | 1 + synapse/rest/login.py | 1 + synapse/rest/presence.py | 1 + synapse/rest/profile.py | 1 + synapse/rest/public.py | 1 + synapse/rest/register.py | 1 + synapse/rest/room.py | 1 + synapse/server.py | 1 + synapse/state.py | 1 + synapse/storage/__init__.py | 1 + synapse/storage/_base.py | 1 + synapse/storage/directory.py | 1 + synapse/storage/feedback.py | 1 + synapse/storage/message.py | 1 + synapse/storage/pdu.py | 1 + synapse/storage/presence.py | 1 + synapse/storage/profile.py | 1 + synapse/storage/registration.py | 1 + synapse/storage/room.py | 1 + synapse/storage/roomdata.py | 1 + synapse/storage/roommember.py | 1 + synapse/storage/stream.py | 1 + synapse/storage/transactions.py | 1 + synapse/types.py | 1 + synapse/util/__init__.py | 1 + synapse/util/async.py | 1 + synapse/util/distributor.py | 1 + synapse/util/jsonobject.py | 1 + synapse/util/lockutils.py | 1 + synapse/util/logutils.py | 1 + synapse/util/stringutils.py | 1 + tests/test_distributor.py | 1 + 76 files changed, 76 insertions(+), 1 deletion(-) diff --git a/synapse/__init__.py b/synapse/__init__.py index aa760fb34..1e7b2ab27 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -12,5 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ This is a reference implementation of a synapse home server. """ diff --git a/synapse/api/__init__.py b/synapse/api/__init__.py index fe8a073cd..2216c0f1c 100644 --- a/synapse/api/__init__.py +++ b/synapse/api/__init__.py @@ -12,3 +12,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 5c66a7261..84bc0398f 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """This module contains classes for authenticating the user.""" from twisted.internet import defer diff --git a/synapse/api/constants.py b/synapse/api/constants.py index 37bf41bfb..29687c348 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """Contains constants from the specification.""" diff --git a/synapse/api/errors.py b/synapse/api/errors.py index 7ad4d636c..8b9766fab 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """Contains exceptions and error codes.""" import logging diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py index bc2daf336..921fd0883 100644 --- a/synapse/api/events/__init__.py +++ b/synapse/api/events/__init__.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from synapse.api.errors import SynapseError, Codes from synapse.util.jsonobject import JsonEncodedObject diff --git a/synapse/api/events/factory.py b/synapse/api/events/factory.py index ea7afa234..12aa04fc6 100644 --- a/synapse/api/events/factory.py +++ b/synapse/api/events/factory.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from synapse.api.events.room import ( RoomTopicEvent, MessageEvent, RoomMemberEvent, FeedbackEvent, InviteJoinEvent, RoomConfigEvent diff --git a/synapse/api/events/room.py b/synapse/api/events/room.py index b31cd19f4..f3df849af 100644 --- a/synapse/api/events/room.py +++ b/synapse/api/events/room.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from . import SynapseEvent diff --git a/synapse/api/notifier.py b/synapse/api/notifier.py index 974f7f0ba..22d2914d3 100644 --- a/synapse/api/notifier.py +++ b/synapse/api/notifier.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from synapse.api.constants import Membership from synapse.api.events.room import RoomMemberEvent diff --git a/synapse/api/streams/__init__.py b/synapse/api/streams/__init__.py index 08137c1e7..989e63f9e 100644 --- a/synapse/api/streams/__init__.py +++ b/synapse/api/streams/__init__.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from synapse.api.errors import SynapseError diff --git a/synapse/api/streams/event.py b/synapse/api/streams/event.py index 0cc1a3e36..4b6d739e5 100644 --- a/synapse/api/streams/event.py +++ b/synapse/api/streams/event.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """This module contains classes for streaming from the event stream: /events. """ from twisted.internet import defer diff --git a/synapse/app/__init__.py b/synapse/app/__init__.py index fe8a073cd..2216c0f1c 100644 --- a/synapse/app/__init__.py +++ b/synapse/app/__init__.py @@ -12,3 +12,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5708b3ad9..9ad8ac7f0 100644 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014 matrix.org # @@ -12,7 +13,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -#!/usr/bin/env python from synapse.storage import read_schema diff --git a/synapse/crypto/__init__.py b/synapse/crypto/__init__.py index fe8a073cd..2216c0f1c 100644 --- a/synapse/crypto/__init__.py +++ b/synapse/crypto/__init__.py @@ -12,3 +12,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/synapse/crypto/config.py b/synapse/crypto/config.py index 801dfd865..2330133e7 100644 --- a/synapse/crypto/config.py +++ b/synapse/crypto/config.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import ConfigParser as configparser import argparse import socket diff --git a/synapse/crypto/keyclient.py b/synapse/crypto/keyclient.py index b53d1c572..e615866b6 100644 --- a/synapse/crypto/keyclient.py +++ b/synapse/crypto/keyclient.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.web.http import HTTPClient from twisted.internet import defer, reactor from twisted.internet.protocol import ClientFactory diff --git a/synapse/crypto/keyserver.py b/synapse/crypto/keyserver.py index 48bd38078..3d80a0e66 100644 --- a/synapse/crypto/keyserver.py +++ b/synapse/crypto/keyserver.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import reactor, ssl from twisted.web import server from twisted.web.resource import Resource diff --git a/synapse/crypto/resource/__init__.py b/synapse/crypto/resource/__init__.py index fe8a073cd..2216c0f1c 100644 --- a/synapse/crypto/resource/__init__.py +++ b/synapse/crypto/resource/__init__.py @@ -12,3 +12,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/synapse/crypto/resource/key.py b/synapse/crypto/resource/key.py index 6ce6e0b03..6aecd2b95 100644 --- a/synapse/crypto/resource/key.py +++ b/synapse/crypto/resource/key.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.web.resource import Resource from twisted.web.server import NOT_DONE_YET from twisted.internet import defer diff --git a/synapse/federation/__init__.py b/synapse/federation/__init__.py index b4d95ed5a..ac0c10dc3 100644 --- a/synapse/federation/__init__.py +++ b/synapse/federation/__init__.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ This package includes all the federation specific logic. """ diff --git a/synapse/federation/handler.py b/synapse/federation/handler.py index 31e8470b3..d361f0aaf 100644 --- a/synapse/federation/handler.py +++ b/synapse/federation/handler.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from .pdu_codec import PduCodec diff --git a/synapse/federation/pdu_codec.py b/synapse/federation/pdu_codec.py index 9155930e4..adc166c56 100644 --- a/synapse/federation/pdu_codec.py +++ b/synapse/federation/pdu_codec.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from .units import Pdu import copy diff --git a/synapse/federation/persistence.py b/synapse/federation/persistence.py index ad4111c68..372245712 100644 --- a/synapse/federation/persistence.py +++ b/synapse/federation/persistence.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ This module contains all the persistence actions done by the federation package. diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py index 0f5b97429..bea5335f8 100644 --- a/synapse/federation/replication.py +++ b/synapse/federation/replication.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """This layer is responsible for replicating with remote home servers using a given transport. """ diff --git a/synapse/federation/transport.py b/synapse/federation/transport.py index 2136adf8d..09a5e5901 100644 --- a/synapse/federation/transport.py +++ b/synapse/federation/transport.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """The transport layer is responsible for both sending transactions to remote home servers and receiving a variety of requests from other home servers. diff --git a/synapse/federation/units.py b/synapse/federation/units.py index 0efea7b76..2b2f11f36 100644 --- a/synapse/federation/units.py +++ b/synapse/federation/units.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ Defines the JSON structure of the protocol units used by the server to server protocol. """ diff --git a/synapse/handlers/__init__.py b/synapse/handlers/__init__.py index 5688b68e4..8a4aa6e5d 100644 --- a/synapse/handlers/__init__.py +++ b/synapse/handlers/__init__.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from .register import RegistrationHandler from .room import ( MessageHandler, RoomCreationHandler, RoomMemberHandler, RoomListHandler diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index 87a392dd7..c2f4685c9 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -14,6 +14,7 @@ # limitations under the License. + class BaseHandler(object): def __init__(self, hs): diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index 456007c71..3cc634890 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from ._base import BaseHandler diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py index 79742a4e1..3af7d824a 100644 --- a/synapse/handlers/events.py +++ b/synapse/handlers/events.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from ._base import BaseHandler diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 12e7afca4..7026df90a 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """Contains handlers for federation events.""" from ._base import BaseHandler diff --git a/synapse/handlers/login.py b/synapse/handlers/login.py index 5a1acd710..ca69829d7 100644 --- a/synapse/handlers/login.py +++ b/synapse/handlers/login.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from ._base import BaseHandler diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 38db4b1d6..1c24efd45 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from synapse.api.errors import SynapseError, AuthError diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index a27206b00..976b8cfcd 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from synapse.api.errors import SynapseError, AuthError diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 246c1f653..593c60334 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """Contains functions for registering clients.""" from twisted.internet import defer diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 4d82b3399..eae40765b 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """Contains functions for performing events on rooms.""" from twisted.internet import defer diff --git a/synapse/http/__init__.py b/synapse/http/__init__.py index fe8a073cd..2216c0f1c 100644 --- a/synapse/http/__init__.py +++ b/synapse/http/__init__.py @@ -12,3 +12,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/synapse/http/client.py b/synapse/http/client.py index bb22b0ee9..d0facbdc6 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer, reactor from twisted.web.client import _AgentBase, _URI, readBody from twisted.web.http_headers import Headers diff --git a/synapse/http/endpoint.py b/synapse/http/endpoint.py index c4e6e63a8..d91500b07 100644 --- a/synapse/http/endpoint.py +++ b/synapse/http/endpoint.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet.endpoints import SSL4ClientEndpoint, TCP4ClientEndpoint from twisted.internet import defer from twisted.internet.error import ConnectError diff --git a/synapse/http/server.py b/synapse/http/server.py index 9fb45971d..d7f4b691b 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from syutil.jsonutil import ( encode_canonical_json, encode_pretty_printed_json ) diff --git a/synapse/rest/__init__.py b/synapse/rest/__init__.py index 3d4dd098d..b7f0c1fd2 100644 --- a/synapse/rest/__init__.py +++ b/synapse/rest/__init__.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from . import ( room, events, register, login, profile, public, presence, im, directory ) diff --git a/synapse/rest/base.py b/synapse/rest/base.py index d90ac611f..2f1ab57c7 100644 --- a/synapse/rest/base.py +++ b/synapse/rest/base.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ This module contains base REST classes for constructing REST servlets. """ import re diff --git a/synapse/rest/directory.py b/synapse/rest/directory.py index a426003a3..31fd26e84 100644 --- a/synapse/rest/directory.py +++ b/synapse/rest/directory.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from synapse.types import RoomAlias, RoomID diff --git a/synapse/rest/events.py b/synapse/rest/events.py index 147257a94..dc811b813 100644 --- a/synapse/rest/events.py +++ b/synapse/rest/events.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """This module contains REST servlets to do with event streaming, /events.""" from twisted.internet import defer diff --git a/synapse/rest/im.py b/synapse/rest/im.py index 39f2dbd74..63a77716a 100644 --- a/synapse/rest/im.py +++ b/synapse/rest/im.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from synapse.api.streams import PaginationConfig diff --git a/synapse/rest/login.py b/synapse/rest/login.py index 0284e125b..88a321833 100644 --- a/synapse/rest/login.py +++ b/synapse/rest/login.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from synapse.api.errors import SynapseError diff --git a/synapse/rest/presence.py b/synapse/rest/presence.py index e4925c20a..604384859 100644 --- a/synapse/rest/presence.py +++ b/synapse/rest/presence.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ This module contains REST servlets to do with presence: /presence/ """ from twisted.internet import defer diff --git a/synapse/rest/profile.py b/synapse/rest/profile.py index f384227c2..3d0427bf7 100644 --- a/synapse/rest/profile.py +++ b/synapse/rest/profile.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ This module contains REST servlets to do with profile: /profile/ """ from twisted.internet import defer diff --git a/synapse/rest/public.py b/synapse/rest/public.py index 6fd1731a6..3430c8049 100644 --- a/synapse/rest/public.py +++ b/synapse/rest/public.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """This module contains REST servlets to do with public paths: /public""" from twisted.internet import defer diff --git a/synapse/rest/register.py b/synapse/rest/register.py index f1cbce5c6..eb457562b 100644 --- a/synapse/rest/register.py +++ b/synapse/rest/register.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """This module contains REST servlets to do with registration: /register""" from twisted.internet import defer diff --git a/synapse/rest/room.py b/synapse/rest/room.py index c96de5e65..228bc9623 100644 --- a/synapse/rest/room.py +++ b/synapse/rest/room.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """ This module contains REST servlets to do with rooms: /rooms/ """ from twisted.internet import defer diff --git a/synapse/server.py b/synapse/server.py index 0aff75f39..4ba203ac3 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + # This file provides some classes for setting up (partially-populated) # homeservers; either as a full homeserver as a real application, or a small # partial one for unit test mocking. diff --git a/synapse/state.py b/synapse/state.py index 439c0b519..b081de8f4 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from synapse.federation.pdu_codec import encode_event_id diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index ec93f9f8a..3c27428c0 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from synapse.api.events.room import ( RoomMemberEvent, MessageEvent, RoomTopicEvent, FeedbackEvent, RoomConfigEvent diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 4d98a6fd0..65f691ead 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import logging from twisted.internet import defer diff --git a/synapse/storage/directory.py b/synapse/storage/directory.py index 71fa9d9c9..b22ce02f3 100644 --- a/synapse/storage/directory.py +++ b/synapse/storage/directory.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore from twisted.internet import defer diff --git a/synapse/storage/feedback.py b/synapse/storage/feedback.py index 2b421e334..9bd562c76 100644 --- a/synapse/storage/feedback.py +++ b/synapse/storage/feedback.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore, Table from synapse.api.events.room import FeedbackEvent diff --git a/synapse/storage/message.py b/synapse/storage/message.py index 4822fa709..7bb69c138 100644 --- a/synapse/storage/message.py +++ b/synapse/storage/message.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore, Table from synapse.api.events.room import MessageEvent diff --git a/synapse/storage/pdu.py b/synapse/storage/pdu.py index a1cdde0a3..202d7f6cb 100644 --- a/synapse/storage/pdu.py +++ b/synapse/storage/pdu.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore, Table, JoinHelper from synapse.util.logutils import log_function diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py index e57ddaf14..6f5b042c2 100644 --- a/synapse/storage/presence.py +++ b/synapse/storage/presence.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore diff --git a/synapse/storage/profile.py b/synapse/storage/profile.py index d2f24930c..91dd56503 100644 --- a/synapse/storage/profile.py +++ b/synapse/storage/profile.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py index 4a970dd54..68cdfbb4c 100644 --- a/synapse/storage/registration.py +++ b/synapse/storage/registration.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from sqlite3 import IntegrityError diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 174cbcf3d..09d9c2339 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from sqlite3 import IntegrityError diff --git a/synapse/storage/roomdata.py b/synapse/storage/roomdata.py index 781d47793..cc04d1ba1 100644 --- a/synapse/storage/roomdata.py +++ b/synapse/storage/roomdata.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore, Table import collections diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index e6e761779..ef73be4af 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer from synapse.types import UserID diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index c3b1bfeb3..1dedffac4 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore from .message import MessagesTable from .feedback import FeedbackTable diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py index aa41e2ad7..a277e4971 100644 --- a/synapse/storage/transactions.py +++ b/synapse/storage/transactions.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from ._base import SQLBaseStore, Table from .pdu import PdusTable diff --git a/synapse/types.py b/synapse/types.py index 1adc95bbb..054b1e713 100644 --- a/synapse/types.py +++ b/synapse/types.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from synapse.api.errors import SynapseError from collections import namedtuple diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py index 5361cb7ec..3ea431a7f 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import reactor import time diff --git a/synapse/util/async.py b/synapse/util/async.py index e04db8e28..ebbdc00ae 100644 --- a/synapse/util/async.py +++ b/synapse/util/async.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer, reactor diff --git a/synapse/util/distributor.py b/synapse/util/distributor.py index 32d19402b..9605d7d1b 100644 --- a/synapse/util/distributor.py +++ b/synapse/util/distributor.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer import logging diff --git a/synapse/util/jsonobject.py b/synapse/util/jsonobject.py index 190a80a32..e2840b59f 100644 --- a/synapse/util/jsonobject.py +++ b/synapse/util/jsonobject.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import copy class JsonEncodedObject(object): diff --git a/synapse/util/lockutils.py b/synapse/util/lockutils.py index e4d609d84..758be0b90 100644 --- a/synapse/util/lockutils.py +++ b/synapse/util/lockutils.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from twisted.internet import defer import logging diff --git a/synapse/util/logutils.py b/synapse/util/logutils.py index 08d5aafca..9270a1790 100644 --- a/synapse/util/logutils.py +++ b/synapse/util/logutils.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from inspect import getcallargs import logging diff --git a/synapse/util/stringutils.py b/synapse/util/stringutils.py index 91550583a..e1b0796e5 100644 --- a/synapse/util/stringutils.py +++ b/synapse/util/stringutils.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import random import string diff --git a/tests/test_distributor.py b/tests/test_distributor.py index 36cbf6c52..db23f1667 100644 --- a/tests/test_distributor.py +++ b/tests/test_distributor.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import unittest from twisted.internet import defer