mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 12:01:52 +08:00
Add __hash__ for a bunch of types that set it to None (#13286)
This commit is contained in:
@@ -2,7 +2,7 @@ import sys
|
||||
from collections.abc import Awaitable, Callable, Coroutine, Iterable, Mapping, Sequence
|
||||
from contextlib import _GeneratorContextManager
|
||||
from types import TracebackType
|
||||
from typing import Any, Final, Generic, Literal, TypeVar, overload
|
||||
from typing import Any, ClassVar, Final, Generic, Literal, TypeVar, overload
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@@ -85,6 +85,7 @@ class _Call(tuple[Any, ...]):
|
||||
two: bool = False,
|
||||
from_kall: bool = True,
|
||||
) -> None: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, value: object, /) -> bool: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _Call: ...
|
||||
@@ -403,6 +404,7 @@ class MagicProxy(Base):
|
||||
class _ANY:
|
||||
def __eq__(self, other: object) -> Literal[True]: ...
|
||||
def __ne__(self, other: object) -> Literal[False]: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
ANY: Any
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import unittest.case
|
||||
import unittest.result
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import ClassVar
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_TestType: TypeAlias = unittest.case.TestCase | TestSuite
|
||||
@@ -17,6 +18,7 @@ class BaseTestSuite:
|
||||
def countTestCases(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_TestType]: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
class TestSuite(BaseTestSuite):
|
||||
def run(self, result: unittest.result.TestResult, debug: bool = False) -> unittest.result.TestResult: ...
|
||||
|
||||
Reference in New Issue
Block a user