summary refs log tree commit diff
path: root/synapse/storage/profile.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-04-03 20:07:29 +1100
committerRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-04-03 10:07:29 +0100
commit7efd1d87c2c424365c99ba6103135edb1845fd88 (patch)
treeeadf93e88f277cca7f6fb694c8457ca5c73f5646 /synapse/storage/profile.py
parentMerge pull request #4991 from matrix-org/erikj/stagger_push_startup (diff)
downloadsynapse-7efd1d87c2c424365c99ba6103135edb1845fd88.tar.xz
Run black on the rest of the storage module (#4996)
Diffstat (limited to 'synapse/storage/profile.py')
-rw-r--r--synapse/storage/profile.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/storage/profile.py b/synapse/storage/profile.py
index 88b50f33b5..aeec2f57c4 100644
--- a/synapse/storage/profile.py
+++ b/synapse/storage/profile.py
@@ -41,8 +41,7 @@ class ProfileWorkerStore(SQLBaseStore):
 
         defer.returnValue(
             ProfileInfo(
-                avatar_url=profile['avatar_url'],
-                display_name=profile['displayname'],
+                avatar_url=profile['avatar_url'], display_name=profile['displayname']
             )
         )
 
@@ -66,16 +65,14 @@ class ProfileWorkerStore(SQLBaseStore):
         return self._simple_select_one(
             table="remote_profile_cache",
             keyvalues={"user_id": user_id},
-            retcols=("displayname", "avatar_url",),
+            retcols=("displayname", "avatar_url"),
             allow_none=True,
             desc="get_from_remote_profile_cache",
         )
 
     def create_profile(self, user_localpart):
         return self._simple_insert(
-            table="profiles",
-            values={"user_id": user_localpart},
-            desc="create_profile",
+            table="profiles", values={"user_id": user_localpart}, desc="create_profile"
         )
 
     def set_profile_displayname(self, user_localpart, new_displayname):
@@ -141,6 +138,7 @@ class ProfileStore(ProfileWorkerStore):
     def get_remote_profile_cache_entries_that_expire(self, last_checked):
         """Get all users who haven't been checked since `last_checked`
         """
+
         def _get_remote_profile_cache_entries_that_expire_txn(txn):
             sql = """
                 SELECT user_id, displayname, avatar_url