mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:24:58 -04:00
Fix up type hints for Twisted 21.7 (#10490)
Mostly this involves decorating a few Deferred declarations with extra type hints. We wrap the types in quotes to avoid runtime errors when running against older versions of Twisted that don't have generics on Deferred.
This commit is contained in:
parent
9643dfde6a
commit
d9cb658c78
6 changed files with 25 additions and 15 deletions
|
@ -413,7 +413,7 @@ class DeferredCacheListDescriptor(_CacheDescriptorBase):
|
|||
# relevant result for that key.
|
||||
deferreds_map = {}
|
||||
for arg in missing:
|
||||
deferred = defer.Deferred()
|
||||
deferred: "defer.Deferred[Any]" = defer.Deferred()
|
||||
deferreds_map[arg] = deferred
|
||||
key = arg_to_cache_key(arg)
|
||||
cache.set(key, deferred, callback=invalidate_callback)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue