summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-03-24 06:48:46 -0400
committerGitHub <noreply@github.com>2021-03-24 06:48:46 -0400
commit7e8dc9934e29ebd5f30f42b4b6e6b4491569373a (patch)
tree7b4f23523a627b04cb4b61c1c24ec9ec4ff03893 /synapse/handlers/sync.py
parentIncrease default join burst ratelimiting (#9674) (diff)
downloadsynapse-7e8dc9934e29ebd5f30f42b4b6e6b4491569373a.tar.xz
Add a type hints for service notices to the HomeServer object. (#9675)
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 7b723ead58..ee607e6e65 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -80,7 +80,7 @@ class SyncConfig:
     filter_collection = attr.ib(type=FilterCollection)
     is_guest = attr.ib(type=bool)
     request_key = attr.ib(type=Tuple[Any, ...])
-    device_id = attr.ib(type=str)
+    device_id = attr.ib(type=Optional[str])
 
 
 @attr.s(slots=True, frozen=True)
@@ -723,7 +723,9 @@ class SyncHandler:
 
         return summary
 
-    def get_lazy_loaded_members_cache(self, cache_key: Tuple[str, str]) -> LruCache:
+    def get_lazy_loaded_members_cache(
+        self, cache_key: Tuple[str, Optional[str]]
+    ) -> LruCache:
         cache = self.lazy_loaded_members_cache.get(cache_key)
         if cache is None:
             logger.debug("creating LruCache for %r", cache_key)