mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 13:05:08 -04:00
Use inline type hints in http/federation/
, storage/
and util/
(#10381)
This commit is contained in:
parent
3acf85c85f
commit
bdfde6dca1
38 changed files with 149 additions and 161 deletions
|
@ -62,13 +62,13 @@ class DictionaryCache(Generic[KT, DKT]):
|
|||
"""
|
||||
|
||||
def __init__(self, name: str, max_entries: int = 1000):
|
||||
self.cache = LruCache(
|
||||
self.cache: LruCache[KT, DictionaryEntry] = LruCache(
|
||||
max_size=max_entries, cache_name=name, size_callback=len
|
||||
) # type: LruCache[KT, DictionaryEntry]
|
||||
)
|
||||
|
||||
self.name = name
|
||||
self.sequence = 0
|
||||
self.thread = None # type: Optional[threading.Thread]
|
||||
self.thread: Optional[threading.Thread] = None
|
||||
|
||||
def check_thread(self) -> None:
|
||||
expected_thread = self.thread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue