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

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

View File

@@ -9,7 +9,7 @@
from _typeshed import Incomplete
from abc import ABCMeta, abstractmethod
from typing import Literal, Protocol, overload
from typing import ClassVar, Literal, Protocol, overload
__all__ = ["Number", "Complex", "Real", "Rational", "Integral"]
@@ -102,6 +102,7 @@ class Complex(Number, _ComplexLike):
def conjugate(self) -> _ComplexLike: ...
@abstractmethod
def __eq__(self, other: object) -> bool: ...
__hash__: ClassVar[None] # type: ignore[assignment]
# See comment at the top of the file
# for why some of these return types are purposefully vague