summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v1/login.py6
-rw-r--r--synapse/rest/client/v2_alpha/account.py4
-rw-r--r--synapse/rest/client/v2_alpha/register.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py
index 8de1a02254..337ba5c02d 100644
--- a/synapse/rest/client/v1/login.py
+++ b/synapse/rest/client/v1/login.py
@@ -80,7 +80,7 @@ def login_id_thirdparty_from_phone(identifier):
     except phonenumbers.NumberParseException:
         raise SynapseError(400, "Unable to parse phone number")
     msisdn = phonenumbers.format_number(
-            phoneNumber, phonenumbers.PhoneNumberFormat.E164
+        phoneNumber, phonenumbers.PhoneNumberFormat.E164
     )[1:]
 
     return {
@@ -188,7 +188,7 @@ class LoginRestServlet(ClientV1RestServlet):
 
         # convert threepid identifiers to user IDs
         if identifier["type"] == "m.id.thirdparty":
-            if not 'medium' in identifier or not 'address' in identifier:
+            if 'medium' not in identifier or 'address' not in identifier:
                 raise SynapseError(400, "Invalid thirdparty identifier")
 
             address = identifier['address']
@@ -198,7 +198,7 @@ class LoginRestServlet(ClientV1RestServlet):
                 # (See add_threepid in synapse/handlers/auth.py)
                 address = address.lower()
             user_id = yield self.hs.get_datastore().get_user_id_by_threepid(
-                    identifier['medium'], address
+                identifier['medium'], address
             )
             if not user_id:
                 raise LoginError(403, "", errcode=Codes.FORBIDDEN)
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py
index cf80f5ca28..06bb3617ec 100644
--- a/synapse/rest/client/v2_alpha/account.py
+++ b/synapse/rest/client/v2_alpha/account.py
@@ -93,7 +93,7 @@ class MsisdnPasswordRequestTokenRestServlet(RestServlet):
         except phonenumbers.NumberParseException:
             raise SynapseError(400, "Unable to parse phone number")
         msisdn = phonenumbers.format_number(
-                phoneNumber, phonenumbers.PhoneNumberFormat.E164
+            phoneNumber, phonenumbers.PhoneNumberFormat.E164
         )[1:]
 
         existingUid = yield self.hs.get_datastore().get_user_id_by_threepid(
@@ -279,7 +279,7 @@ class MsisdnThreepidRequestTokenRestServlet(RestServlet):
         except phonenumbers.NumberParseException:
             raise SynapseError(400, "Unable to parse phone number")
         msisdn = phonenumbers.format_number(
-                phoneNumber, phonenumbers.PhoneNumberFormat.E164
+            phoneNumber, phonenumbers.PhoneNumberFormat.E164
         )[1:]
 
         existingUid = yield self.hs.get_datastore().get_user_id_by_threepid(
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py
index 768e753083..ad3c70814d 100644
--- a/synapse/rest/client/v2_alpha/register.py
+++ b/synapse/rest/client/v2_alpha/register.py
@@ -116,7 +116,7 @@ class MsisdnRegisterRequestTokenRestServlet(RestServlet):
         except phonenumbers.NumberParseException:
             raise SynapseError(400, "Unable to parse phone number")
         msisdn = phonenumbers.format_number(
-                phoneNumber, phonenumbers.PhoneNumberFormat.E164
+            phoneNumber, phonenumbers.PhoneNumberFormat.E164
         )[1:]
 
         existingUid = yield self.hs.get_datastore().get_user_id_by_threepid(