Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
fix for old twisted
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Feb 25, 2022
1 parent 5fb85fb commit 82b4ea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/util/caches/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@ def __init__(

def __get__(
self, obj: Optional[Any], objtype: Optional[Type] = None
) -> Callable[..., defer.Deferred[Dict[Hashable, Any]]]:
) -> Callable[..., "defer.Deferred[Dict[Hashable, Any]]"]:
cached_method = getattr(obj, self.cached_method_name)
cache: DeferredCache[CacheKey, Any] = cached_method.cache
num_args = cached_method.num_args

@functools.wraps(self.orig)
def wrapped(*args: Any, **kwargs: Any) -> defer.Deferred[Dict]:
def wrapped(*args: Any, **kwargs: Any) -> "defer.Deferred[Dict]":
# If we're passed a cache_context then we'll want to call its
# invalidate() whenever we are invalidated
invalidate_callback = kwargs.pop("on_invalidate", None)
Expand Down

0 comments on commit 82b4ea6

Please sign in to comment.