diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2021-07-16 19:22:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 18:22:36 +0100 |
commit | 98aec1cc9da2bd6b8e34ffb282c85abf9b8b42ca (patch) | |
tree | 82bb48929e2f63d543fba936cfb0f1f621ee3659 /synapse/handlers/initial_sync.py | |
parent | Add a module type for account validity (#9884) (diff) | |
download | synapse-98aec1cc9da2bd6b8e34ffb282c85abf9b8b42ca.tar.xz |
Use inline type hints in `handlers/` and `rest/`. (#10382)
Diffstat (limited to 'synapse/handlers/initial_sync.py')
-rw-r--r-- | synapse/handlers/initial_sync.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py index 76242865ae..5d49640760 100644 --- a/synapse/handlers/initial_sync.py +++ b/synapse/handlers/initial_sync.py @@ -46,9 +46,17 @@ class InitialSyncHandler(BaseHandler): self.state = hs.get_state_handler() self.clock = hs.get_clock() self.validator = EventValidator() - self.snapshot_cache = ResponseCache( - hs.get_clock(), "initial_sync_cache" - ) # type: ResponseCache[Tuple[str, Optional[StreamToken], Optional[StreamToken], str, Optional[int], bool, bool]] + self.snapshot_cache: ResponseCache[ + Tuple[ + str, + Optional[StreamToken], + Optional[StreamToken], + str, + Optional[int], + bool, + bool, + ] + ] = ResponseCache(hs.get_clock(), "initial_sync_cache") self._event_serializer = hs.get_event_client_serializer() self.storage = hs.get_storage() self.state_store = self.storage.state |