summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/__init__.py1
-rw-r--r--synapse/api/__init__.py1
-rw-r--r--synapse/api/auth.py1
-rw-r--r--synapse/api/constants.py1
-rw-r--r--synapse/api/errors.py1
-rw-r--r--synapse/api/events/__init__.py1
-rw-r--r--synapse/api/events/factory.py1
-rw-r--r--synapse/api/events/room.py1
-rw-r--r--synapse/api/notifier.py1
-rw-r--r--synapse/api/streams/__init__.py1
-rw-r--r--synapse/api/streams/event.py1
-rw-r--r--synapse/app/__init__.py1
-rw-r--r--synapse/app/homeserver.py2
-rw-r--r--synapse/crypto/__init__.py1
-rw-r--r--synapse/crypto/config.py1
-rw-r--r--synapse/crypto/keyclient.py1
-rw-r--r--synapse/crypto/keyserver.py1
-rw-r--r--synapse/crypto/resource/__init__.py1
-rw-r--r--synapse/crypto/resource/key.py1
-rw-r--r--synapse/federation/__init__.py1
-rw-r--r--synapse/federation/handler.py1
-rw-r--r--synapse/federation/pdu_codec.py1
-rw-r--r--synapse/federation/persistence.py1
-rw-r--r--synapse/federation/replication.py1
-rw-r--r--synapse/federation/transport.py1
-rw-r--r--synapse/federation/units.py1
-rw-r--r--synapse/handlers/__init__.py1
-rw-r--r--synapse/handlers/_base.py1
-rw-r--r--synapse/handlers/directory.py1
-rw-r--r--synapse/handlers/events.py1
-rw-r--r--synapse/handlers/federation.py1
-rw-r--r--synapse/handlers/login.py1
-rw-r--r--synapse/handlers/presence.py1
-rw-r--r--synapse/handlers/profile.py1
-rw-r--r--synapse/handlers/register.py1
-rw-r--r--synapse/handlers/room.py1
-rw-r--r--synapse/http/__init__.py1
-rw-r--r--synapse/http/client.py1
-rw-r--r--synapse/http/endpoint.py1
-rw-r--r--synapse/http/server.py1
-rw-r--r--synapse/rest/__init__.py1
-rw-r--r--synapse/rest/base.py1
-rw-r--r--synapse/rest/directory.py1
-rw-r--r--synapse/rest/events.py1
-rw-r--r--synapse/rest/im.py1
-rw-r--r--synapse/rest/login.py1
-rw-r--r--synapse/rest/presence.py1
-rw-r--r--synapse/rest/profile.py1
-rw-r--r--synapse/rest/public.py1
-rw-r--r--synapse/rest/register.py1
-rw-r--r--synapse/rest/room.py1
-rw-r--r--synapse/server.py1
-rw-r--r--synapse/state.py1
-rw-r--r--synapse/storage/__init__.py1
-rw-r--r--synapse/storage/_base.py1
-rw-r--r--synapse/storage/directory.py1
-rw-r--r--synapse/storage/feedback.py1
-rw-r--r--synapse/storage/message.py1
-rw-r--r--synapse/storage/pdu.py1
-rw-r--r--synapse/storage/presence.py1
-rw-r--r--synapse/storage/profile.py1
-rw-r--r--synapse/storage/registration.py1
-rw-r--r--synapse/storage/room.py1
-rw-r--r--synapse/storage/roomdata.py1
-rw-r--r--synapse/storage/roommember.py1
-rw-r--r--synapse/storage/stream.py1
-rw-r--r--synapse/storage/transactions.py1
-rw-r--r--synapse/types.py1
-rw-r--r--synapse/util/__init__.py1
-rw-r--r--synapse/util/async.py1
-rw-r--r--synapse/util/distributor.py1
-rw-r--r--synapse/util/jsonobject.py1
-rw-r--r--synapse/util/lockutils.py1
-rw-r--r--synapse/util/logutils.py1
-rw-r--r--synapse/util/stringutils.py1
75 files changed, 75 insertions, 1 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py
index aa760fb341..1e7b2ab272 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 fe8a073cd3..2216c0f1ca 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 5c66a7261f..84bc0398fd 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 37bf41bfb3..29687c3482 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 7ad4d636c2..8b9766fab7 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 bc2daf3361..921fd08832 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 ea7afa234e..12aa04fc6e 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 b31cd19f4b..f3df849af2 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 974f7f0ba0..22d2914d38 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 08137c1e79..989e63f9ec 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 0cc1a3e36a..4b6d739e54 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 fe8a073cd3..2216c0f1ca 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 5708b3ad95..9ad8ac7f0e 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 fe8a073cd3..2216c0f1ca 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 801dfd8656..2330133e71 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 b53d1c572b..e615866b68 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 48bd380781..3d80a0e660 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 fe8a073cd3..2216c0f1ca 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 6ce6e0b034..6aecd2b95f 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 b4d95ed5ac..ac0c10dc33 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 31e8470b33..d361f0aaf7 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 9155930e47..adc166c564 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 ad4111c683..372245712a 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 0f5b974291..bea5335f89 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 2136adf8d7..09a5e5901a 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 0efea7b768..2b2f11f36a 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 5688b68e49..8a4aa6e5d6 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 87a392dd77..c2f4685c92 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 456007c71d..3cc6348906 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 79742a4e1c..3af7d824a2 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 12e7afca4c..7026df90a2 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 5a1acd7102..ca69829d77 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 38db4b1d67..1c24efd454 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 a27206b002..976b8cfcdc 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 246c1f6530..593c603346 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 4d82b33993..eae40765b3 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 fe8a073cd3..2216c0f1ca 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 bb22b0ee9a..d0facbdc6c 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 c4e6e63a80..d91500b07d 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 9fb45971d5..d7f4b691bc 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 3d4dd098d6..b7f0c1fd2e 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 d90ac611fe..2f1ab57c73 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 a426003a38..31fd26e848 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 147257a940..dc811b813a 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 39f2dbd749..63a77716a0 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 0284e125b4..88a3218332 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 e4925c20a5..6043848595 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/<paths>
 """
 from twisted.internet import defer
diff --git a/synapse/rest/profile.py b/synapse/rest/profile.py
index f384227c29..3d0427bf72 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/<paths> """
 from twisted.internet import defer
 
diff --git a/synapse/rest/public.py b/synapse/rest/public.py
index 6fd1731a61..3430c8049f 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 f1cbce5c67..eb457562b9 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 c96de5e65d..228bc9623d 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/<paths> """
 from twisted.internet import defer
 
diff --git a/synapse/server.py b/synapse/server.py
index 0aff75f399..4ba203ac38 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 439c0b519a..b081de8f4f 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 ec93f9f8a7..3c27428c08 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 4d98a6fd0d..65f691ead4 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 71fa9d9c9c..b22ce02f3f 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 2b421e3342..9bd562c762 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 4822fa709d..7bb69c1384 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 a1cdde0a3b..202d7f6cb6 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 e57ddaf149..6f5b042c25 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 d2f24930c1..91dd565033 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 4a970dd546..68cdfbb4ca 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 174cbcf3d8..09d9c2339b 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 781d477931..cc04d1ba14 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 e6e7617797..ef73be4af4 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 c3b1bfeb32..1dedffac49 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 aa41e2ad7f..a277e4971a 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 1adc95bbb0..054b1e713c 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 5361cb7ec2..3ea431a7f9 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 e04db8e285..ebbdc00ae1 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 32d19402b4..9605d7d1b9 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 190a80a322..e2840b59f9 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 e4d609d84e..758be0b901 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 08d5aafca4..9270a1790b 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 91550583a4..e1b0796e56 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