mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 04:24:56 -04:00
Add type hints to state database module. (#10823)
This commit is contained in:
parent
b93259082c
commit
3eba047d38
6 changed files with 133 additions and 72 deletions
|
@ -130,7 +130,7 @@ class DictionaryCache(Generic[KT, DKT, DV]):
|
|||
sequence: int,
|
||||
key: KT,
|
||||
value: Dict[DKT, DV],
|
||||
fetched_keys: Optional[Set[DKT]] = None,
|
||||
fetched_keys: Optional[Iterable[DKT]] = None,
|
||||
) -> None:
|
||||
"""Updates the entry in the cache
|
||||
|
||||
|
@ -155,7 +155,7 @@ class DictionaryCache(Generic[KT, DKT, DV]):
|
|||
self._update_or_insert(key, value, fetched_keys)
|
||||
|
||||
def _update_or_insert(
|
||||
self, key: KT, value: Dict[DKT, DV], known_absent: Set[DKT]
|
||||
self, key: KT, value: Dict[DKT, DV], known_absent: Iterable[DKT]
|
||||
) -> None:
|
||||
# We pop and reinsert as we need to tell the cache the size may have
|
||||
# changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue