From 8d25beb624c48f2de10f56dec6e9ff9471c73b9a Mon Sep 17 00:00:00 2001 From: Ilya Konstantinov Date: Sat, 25 Apr 2020 15:42:00 -0400 Subject: [PATCH] lru_cache-wrapped function args must be Hashable --- stdlib/3/functools.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/3/functools.pyi b/stdlib/3/functools.pyi index 10469c183868..54a7b58e7442 100644 --- a/stdlib/3/functools.pyi +++ b/stdlib/3/functools.pyi @@ -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: ...