diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-07-28 13:04:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 12:04:11 +0000 |
commit | d9cb658c78bdb676762488d08ba44998307c781a (patch) | |
tree | f4dd98a0898cd74580fedbd6b19dbfa840998368 /synapse/util/caches/descriptors.py | |
parent | improve typing annotations in CachedCall (#10450) (diff) | |
download | synapse-d9cb658c78bdb676762488d08ba44998307c781a.tar.xz |
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.
Diffstat (limited to 'synapse/util/caches/descriptors.py')
-rw-r--r-- | synapse/util/caches/descriptors.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/caches/descriptors.py b/synapse/util/caches/descriptors.py index 1e8e6b1d01..1ca31e41ac 100644 --- a/synapse/util/caches/descriptors.py +++ b/synapse/util/caches/descriptors.py @@ -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) |