Add __hash__ for a bunch of types that set it to None (#13286)

This commit is contained in:
Stephen Morton authored and GitHub committed 2024-12-23 23:16:22 -08:00
1 parent 1f0a86ceb4
commit 3944c7839e
32 files changed
+69 -27

No files matched your search

+3 -1
View File
@@ -3,7 +3,7 @@ from _typeshed import SupportsKeysAndGetItem
from _weakref import getweakrefcount as getweakrefcount, getweakrefs as getweakrefs, proxy as proxy
from _weakrefset import WeakSet as WeakSet
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping
from typing import Any, Generic, TypeVar, final, overload
from typing import Any, ClassVar, Generic, TypeVar, final, overload
from typing_extensions import ParamSpec, Self
if sys.version_info >= (3, 9):
@@ -47,11 +47,13 @@ class CallableProxyType(Generic[_CallableT]): # "weakcallableproxy"
def __eq__(self, value: object, /) -> bool: ...
def __getattr__(self, attr: str) -> Any: ...
__call__: _CallableT
__hash__: ClassVar[None] # type: ignore[assignment]
@final
class ProxyType(Generic[_T]): # "weakproxy"
def __eq__(self, value: object, /) -> bool: ...
def __getattr__(self, attr: str) -> Any: ...
__hash__: ClassVar[None] # type: ignore[assignment]
class ReferenceType(Generic[_T]): # "weakref"
__callback__: Callable[[Self], Any]