Add a type hints for service notices to the HomeServer object. (#9675)

This commit is contained in:
Patrick Cloke 2021-03-24 06:48:46 -04:00 committed by GitHub
parent e550ab17ad
commit 7e8dc9934e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 52 additions and 40 deletions

View file

@ -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)