Skip to content

Commit 3df22de

Browse files
Unpack args
This should be possible since python/mypy#13459 (v0.990) Change-Id: I19475f6470228a1af6c30ac9889e0c8e371d9fb6
1 parent c420fea commit 3df22de

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmk/utils/caching.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ def instance_method_lru_cache(
2626
def wrap(f: Callable[P, R]) -> Callable[P, R]:
2727
@wraps(f)
2828
def wrapped_f(*args: P.args, **kwargs: P.kwargs) -> R:
29-
# We can use the following when https://github.com/python/mypy/pull/13459 is release (mypy 0.980)
30-
# self, *rest = args
31-
self = args[0]
32-
rest = args[1:]
29+
self, *rest = args
3330
cache_orig = lru_cache(maxsize, typed)(f)
3431
instance_cache = cache_orig.__get__(self, self.__class__) # type: ignore[attr-defined] # pylint: disable=unnecessary-dunder-call
3532
setattr(self, f.__name__, instance_cache)

0 commit comments

Comments
 (0)