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..1ff1af76ec 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."""
@@ -36,7 +37,7 @@ class Feedback(object):
class PresenceState(object):
"""Represents the presence state of a user."""
- OFFLINE = 0
- BUSY = 1
- ONLINE = 2
- FREE_FOR_CHAT = 3
+ OFFLINE = u"offline"
+ UNAVAILABLE = u"unavailable"
+ ONLINE = u"online"
+ FREE_FOR_CHAT = u"free_for_chat"
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
|