lru_cache-wrapped function args must be Hashable (#3944)

This commit is contained in:
Ilya Konstantinov authored and GitHub committed 2020-05-27 20:20:56 -07:00
1 parent 2a13ba9415
commit 1dc585385a
1 file changed
+2 -2
+2 -2
View File
@@ -1,5 +1,5 @@
import sys
from typing import Any, Callable, Generic, Dict, Iterable, Mapping, Optional, Sequence, Tuple, Type, TypeVar, NamedTuple, Union, overload
from typing import Any, Callable, Generic, Dict, Hashable, Iterable, Mapping, Optional, Sequence, Tuple, Type, TypeVar, NamedTuple, Union, overload
_AnyCallable = Callable[..., Any]
@@ -21,7 +21,7 @@ class _CacheInfo(NamedTuple):
class _lru_cache_wrapper(Generic[_T]):
__wrapped__: Callable[..., _T]
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
def __call__(self, *args: Hashable, **kwargs: Hashable) -> _T: ...
def cache_info(self) -> _CacheInfo: ...
def cache_clear(self) -> None: ...