From 097d2231b4b49b59979f3958d2acffe5f301bf95 Mon Sep 17 00:00:00 2001 From: Charles Smith Date: Mon, 11 Oct 2021 06:13:33 -0400 Subject: [PATCH] Fix type of lock parameter of cachetools.cachedmethod() decorator (#6144) --- stubs/cachetools/cachetools/__init__.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stubs/cachetools/cachetools/__init__.pyi b/stubs/cachetools/cachetools/__init__.pyi index 927aa8fa8..fa9915f97 100644 --- a/stubs/cachetools/cachetools/__init__.pyi +++ b/stubs/cachetools/cachetools/__init__.pyi @@ -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: ...