diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-10-21 06:44:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-21 06:44:31 -0400 |
commit | de5cafe980391ae6e2de1d38ac4e42dea182a304 (patch) | |
tree | 6b7a69562b72b7163363eea9811623bfc3ebef98 /synapse/storage | |
parent | Consistently use wrap_as_background_task in more places (#8599) (diff) | |
download | synapse-de5cafe980391ae6e2de1d38ac4e42dea182a304.tar.xz |
Add type hints to profile and base handlers. (#8609)
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/databases/main/profile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/profile.py b/synapse/storage/databases/main/profile.py index 1681caa1f0..a6d1eb908a 100644 --- a/synapse/storage/databases/main/profile.py +++ b/synapse/storage/databases/main/profile.py @@ -12,7 +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 typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from synapse.api.errors import StoreError from synapse.storage._base import SQLBaseStore @@ -72,7 +72,7 @@ class ProfileWorkerStore(SQLBaseStore): ) async def set_profile_displayname( - self, user_localpart: str, new_displayname: str + self, user_localpart: str, new_displayname: Optional[str] ) -> None: await self.db_pool.simple_update_one( table="profiles", @@ -144,7 +144,7 @@ class ProfileWorkerStore(SQLBaseStore): async def get_remote_profile_cache_entries_that_expire( self, last_checked: int - ) -> Dict[str, str]: + ) -> List[Dict[str, str]]: """Get all users who haven't been checked since `last_checked` """ |