diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-05-31 07:18:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 07:18:29 -0400 |
commit | c01343de43b86eb4a6c055547369d07c198a435f (patch) | |
tree | af7939b9a5ee9990f469f8a143eb2e3fc19ff3be /synapse/util/caches/lrucache.py | |
parent | Merge branch 'release-v1.85' into develop (diff) | |
download | synapse-c01343de43b86eb4a6c055547369d07c198a435f.tar.xz |
Add stricter mypy options (#15694)
Enable warn_unused_configs, strict_concatenate, disallow_subclassing_any, and disallow_incomplete_defs.
Diffstat (limited to 'synapse/util/caches/lrucache.py')
-rw-r--r-- | synapse/util/caches/lrucache.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py index 452d5d04c1..ed0da17227 100644 --- a/synapse/util/caches/lrucache.py +++ b/synapse/util/caches/lrucache.py @@ -93,10 +93,8 @@ VT = TypeVar("VT") # a general type var, distinct from either KT or VT T = TypeVar("T") -P = TypeVar("P") - -class _TimedListNode(ListNode[P]): +class _TimedListNode(ListNode[T]): """A `ListNode` that tracks last access time.""" __slots__ = ["last_access_ts_secs"] @@ -821,7 +819,7 @@ class AsyncLruCache(Generic[KT, VT]): utilize external cache systems that require await behaviour to be created. """ - def __init__(self, *args, **kwargs): # type: ignore + def __init__(self, *args: Any, **kwargs: Any): self._lru_cache: LruCache[KT, VT] = LruCache(*args, **kwargs) async def get( |