diff options
author | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2021-08-24 14:01:48 +0100 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2021-08-24 14:01:48 +0100 |
commit | 07303c1c998bf56416dcd1a1541cc0751d213a7e (patch) | |
tree | dbdb4091fe562fd21a0f82f02d4d9b40afecb159 | |
parent | Tweak this; we can do better (diff) | |
download | synapse-07303c1c998bf56416dcd1a1541cc0751d213a7e.tar.xz |
Fix type annotations on olddeps
-rw-r--r-- | synapse/util/caches/multi_key_response_cache.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/util/caches/multi_key_response_cache.py b/synapse/util/caches/multi_key_response_cache.py index 1e35c33a4b..c87bb3734e 100644 --- a/synapse/util/caches/multi_key_response_cache.py +++ b/synapse/util/caches/multi_key_response_cache.py @@ -85,7 +85,7 @@ class MultiKeyResponseCache(Generic[KV]): def __len__(self) -> int: return self.size() - def get(self, key: KV) -> Optional[defer.Deferred]: + def get(self, key: KV) -> "Optional[defer.Deferred[RV]]": """Look up the given key. Returns a new Deferred (which also doesn't follow the synapse @@ -110,7 +110,7 @@ class MultiKeyResponseCache(Generic[KV]): def _set( self, context: MultiKeyResponseCacheContext[KV], deferred: defer.Deferred - ) -> defer.Deferred: + ) -> "defer.Deferred[RV]": """Set the entry for the given key to the given deferred. *deferred* should run its callbacks in the sentinel logcontext (ie, @@ -164,7 +164,7 @@ class MultiKeyResponseCache(Generic[KV]): *args: Any, cache_context: bool = False, **kwargs: Any, - ) -> defer.Deferred[RV]: + ) -> "defer.Deferred[RV]": """Perform a *set* call, taking care of logcontexts Makes a call to *callback(*args, **kwargs)*, which should |