Run Black. (#5482)
1 files changed, 25 insertions, 21 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py
index ee129c8689..3ffde0d7fc 100644
--- a/synapse/api/constants.py
+++ b/synapse/api/constants.py
@@ -18,7 +18,7 @@
"""Contains constants from the specification."""
# the "depth" field on events is limited to 2**63 - 1
-MAX_DEPTH = 2**63 - 1
+MAX_DEPTH = 2 ** 63 - 1
# the maximum length for a room alias is 255 characters
MAX_ALIAS_LENGTH = 255
@@ -30,39 +30,41 @@ MAX_USERID_LENGTH = 255
class Membership(object):
"""Represents the membership states of a user in a room."""
- INVITE = u"invite"
- JOIN = u"join"
- KNOCK = u"knock"
- LEAVE = u"leave"
- BAN = u"ban"
+
+ INVITE = "invite"
+ JOIN = "join"
+ KNOCK = "knock"
+ LEAVE = "leave"
+ BAN = "ban"
LIST = (INVITE, JOIN, KNOCK, LEAVE, BAN)
class PresenceState(object):
"""Represents the presence state of a user."""
- OFFLINE = u"offline"
- UNAVAILABLE = u"unavailable"
- ONLINE = u"online"
+
+ OFFLINE = "offline"
+ UNAVAILABLE = "unavailable"
+ ONLINE = "online"
class JoinRules(object):
- PUBLIC = u"public"
- KNOCK = u"knock"
- INVITE = u"invite"
- PRIVATE = u"private"
+ PUBLIC = "public"
+ KNOCK = "knock"
+ INVITE = "invite"
+ PRIVATE = "private"
class LoginType(object):
- PASSWORD = u"m.login.password"
- EMAIL_IDENTITY = u"m.login.email.identity"
- MSISDN = u"m.login.msisdn"
- RECAPTCHA = u"m.login.recaptcha"
- TERMS = u"m.login.terms"
- DUMMY = u"m.login.dummy"
+ PASSWORD = "m.login.password"
+ EMAIL_IDENTITY = "m.login.email.identity"
+ MSISDN = "m.login.msisdn"
+ RECAPTCHA = "m.login.recaptcha"
+ TERMS = "m.login.terms"
+ DUMMY = "m.login.dummy"
# Only for C/S API v1
- APPLICATION_SERVICE = u"m.login.application_service"
- SHARED_SECRET = u"org.matrix.login.shared_secret"
+ APPLICATION_SERVICE = "m.login.application_service"
+ SHARED_SECRET = "org.matrix.login.shared_secret"
class EventTypes(object):
@@ -118,6 +120,7 @@ class UserTypes(object):
"""Allows for user type specific behaviour. With the benefit of hindsight
'admin' and 'guest' users should also be UserTypes. Normal users are type None
"""
+
SUPPORT = "support"
ALL_USER_TYPES = (SUPPORT,)
@@ -125,6 +128,7 @@ class UserTypes(object):
class RelationTypes(object):
"""The types of relations known to this server.
"""
+
ANNOTATION = "m.annotation"
REPLACE = "m.replace"
REFERENCE = "m.reference"
|