From 933787d5fe83ff132e62f19dbeb97a6cc71643af Mon Sep 17 00:00:00 2001 From: Akuli Date: Sun, 9 May 2021 20:23:40 +0300 Subject: [PATCH] return Hashable from functools._make_key (#5385) --- stdlib/functools.pyi | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/stdlib/functools.pyi b/stdlib/functools.pyi index fe1902800..d4a492c01 100644 --- a/stdlib/functools.pyi +++ b/stdlib/functools.pyi @@ -7,7 +7,6 @@ from typing import ( Generic, Hashable, Iterable, - List, Mapping, NamedTuple, Optional, @@ -135,12 +134,6 @@ if sys.version_info >= (3, 8): if sys.version_info >= (3, 9): def cache(__user_function: Callable[..., _T]) -> _lru_cache_wrapper[_T]: ... -class _HashedSeq(Generic[_T], List[_T]): - __slots__: str - hashvalue: int - def __init__(self, tup: Tuple[Any, ...], hash: Callable[[object], int] = ...) -> None: ... - def __hash__(self) -> int: ... # type: ignore - def _make_key( args: Tuple[Hashable, ...], kwds: SupportsItems[Any, Any], @@ -150,4 +143,4 @@ def _make_key( tuple: type = ..., type: Any = ..., len: Callable[[Sized], int] = ..., -) -> Union[Hashable, _HashedSeq[Any]]: ... +) -> Hashable: ...