Revert "Remove un-needed __hash__ methods from stdlib (#8465)" (#10426)

Reverts https://github.com/python/typeshed/pull/8465
Fixes https://github.com/python/typeshed/issues/10424
Closes https://github.com/python/typeshed/pull/10425

https://github.com/python/typeshed/pull/8465 caused regressions: see https://github.com/python/typeshed/issues/10424 and https://github.com/python/mypy/issues/13800. Since it didn't fix any known problems (just some stylistic nits that we had), let's just revert the PR.
This commit is contained in:
Alex Waygood
2023-07-09 16:43:32 +01:00
committed by GitHub
parent aed8c3fe1c
commit 81b8211d0e
12 changed files with 21 additions and 0 deletions

View File

@@ -921,6 +921,7 @@ class ForwardRef:
def _evaluate(self, globalns: dict[str, Any] | None, localns: dict[str, Any] | None) -> Any | None: ...
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...
if sys.version_info >= (3, 11):
def __or__(self, other: Any) -> _SpecialForm: ...
def __ror__(self, other: Any) -> _SpecialForm: ...