Fix type of lock parameter of cachetools.cachedmethod() decorator (#6144)

This commit is contained in:
Charles Smith
2021-10-11 06:13:33 -04:00
committed by GitHub
parent e3ae2e9291
commit 097d2231b4

View File

@@ -54,5 +54,7 @@ def cached(
cache: MutableMapping[_KT, Any] | None, key: Callable[..., _KT] = ..., lock: ContextManager[Any] | None = ...
) -> IdentityFunction: ...
def cachedmethod(
cache: Callable[[Any], MutableMapping[_KT, Any] | None], key: Callable[..., _KT] = ..., lock: ContextManager[Any] | None = ...
cache: Callable[[Any], MutableMapping[_KT, Any] | None],
key: Callable[..., _KT] = ...,
lock: Callable[[Any], ContextManager[Any]] | None = ...,
) -> IdentityFunction: ...