mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Stdlib: add many missing __hash__ and __eq__ methods (#10464)
This commit is contained in:
@@ -69,6 +69,7 @@ _VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers.
|
||||
|
||||
@final
|
||||
class dict_keys(KeysView[_KT_co], Generic[_KT_co, _VT_co]): # undocumented
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
@property
|
||||
def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ...
|
||||
@@ -81,6 +82,7 @@ class dict_values(ValuesView[_VT_co], Generic[_KT_co, _VT_co]): # undocumented
|
||||
|
||||
@final
|
||||
class dict_items(ItemsView[_KT_co, _VT_co], Generic[_KT_co, _VT_co]): # undocumented
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
@property
|
||||
def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ...
|
||||
|
||||
@@ -11,17 +11,20 @@ _T = TypeVar("_T")
|
||||
|
||||
@final
|
||||
class CallableProxyType(Generic[_C]): # "weakcallableproxy"
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
__call__: _C
|
||||
|
||||
@final
|
||||
class ProxyType(Generic[_T]): # "weakproxy"
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
|
||||
class ReferenceType(Generic[_T]):
|
||||
__callback__: Callable[[ReferenceType[_T]], Any]
|
||||
def __new__(cls, __o: _T, __callback: Callable[[ReferenceType[_T]], Any] | None = ...) -> Self: ...
|
||||
def __call__(self) -> _T | None: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -70,6 +70,7 @@ class array(MutableSequence[_T], Generic[_T]):
|
||||
def __setitem__(self, __key: slice, __value: array[_T]) -> None: ...
|
||||
def __delitem__(self, __key: SupportsIndex | slice) -> None: ...
|
||||
def __add__(self, __value: array[_T]) -> array[_T]: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __ge__(self, __value: array[_T]) -> bool: ...
|
||||
def __gt__(self, __value: array[_T]) -> bool: ...
|
||||
def __iadd__(self, __value: array[_T]) -> Self: ... # type: ignore[override]
|
||||
|
||||
@@ -874,6 +874,8 @@ class memoryview(Sequence[int]):
|
||||
def __contains__(self, __x: object) -> bool: ...
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@overload
|
||||
def __setitem__(self, __key: slice, __value: ReadableBuffer) -> None: ...
|
||||
@overload
|
||||
@@ -941,6 +943,7 @@ class slice:
|
||||
def __init__(self, __stop: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, __start: Any, __stop: Any, __step: Any = ...) -> None: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def indices(self, __len: SupportsIndex) -> tuple[int, int, int]: ...
|
||||
|
||||
@@ -957,6 +960,8 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
def __le__(self, __value: tuple[_T_co, ...]) -> bool: ...
|
||||
def __gt__(self, __value: tuple[_T_co, ...]) -> bool: ...
|
||||
def __ge__(self, __value: tuple[_T_co, ...]) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@overload
|
||||
def __add__(self, __value: tuple[_T_co, ...]) -> tuple[_T_co, ...]: ...
|
||||
@overload
|
||||
@@ -1045,6 +1050,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def __ge__(self, __value: list[_T]) -> bool: ...
|
||||
def __lt__(self, __value: list[_T]) -> bool: ...
|
||||
def __le__(self, __value: list[_T]) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, __item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -1097,6 +1103,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __setitem__(self, __key: _KT, __value: _VT) -> None: ...
|
||||
def __delitem__(self, __key: _KT) -> None: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __reversed__(self) -> Iterator[_KT]: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
@@ -1151,6 +1158,7 @@ class set(MutableSet[_T], Generic[_T]):
|
||||
def __lt__(self, __value: AbstractSet[object]) -> bool: ...
|
||||
def __ge__(self, __value: AbstractSet[object]) -> bool: ...
|
||||
def __gt__(self, __value: AbstractSet[object]) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, __item: Any) -> GenericAlias: ...
|
||||
@@ -1179,6 +1187,8 @@ class frozenset(AbstractSet[_T_co], Generic[_T_co]):
|
||||
def __lt__(self, __value: AbstractSet[object]) -> bool: ...
|
||||
def __ge__(self, __value: AbstractSet[object]) -> bool: ...
|
||||
def __gt__(self, __value: AbstractSet[object]) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, __item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -1204,6 +1214,8 @@ class range(Sequence[int]):
|
||||
def count(self, __value: int) -> int: ...
|
||||
def index(self, __value: int) -> int: ... # type: ignore[override]
|
||||
def __len__(self) -> int: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __contains__(self, __key: object) -> bool: ...
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
@overload
|
||||
|
||||
@@ -153,6 +153,7 @@ class UserString(Sequence[UserString]):
|
||||
def __gt__(self, string: str | UserString) -> bool: ...
|
||||
def __ge__(self, string: str | UserString) -> bool: ...
|
||||
def __eq__(self, string: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __contains__(self, char: object) -> bool: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __getitem__(self, index: SupportsIndex | slice) -> Self: ...
|
||||
@@ -257,6 +258,7 @@ class deque(MutableSequence[_T], Generic[_T]):
|
||||
def __le__(self, __value: deque[_T]) -> bool: ...
|
||||
def __gt__(self, __value: deque[_T]) -> bool: ...
|
||||
def __ge__(self, __value: deque[_T]) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, __item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -365,6 +367,7 @@ class OrderedDict(dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
|
||||
def setdefault(self: OrderedDict[_KT, _T | None], key: _KT, default: None = None) -> _T | None: ...
|
||||
@overload
|
||||
def setdefault(self, key: _KT, default: _VT) -> _VT: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
|
||||
class defaultdict(dict[_KT, _VT], Generic[_KT, _VT]):
|
||||
default_factory: Callable[[], _VT] | None
|
||||
|
||||
@@ -18,6 +18,7 @@ class ContextVar(Generic[_T]):
|
||||
def __init__(self, name: str) -> None: ...
|
||||
@overload
|
||||
def __init__(self, name: str, *, default: _T) -> None: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
@overload
|
||||
@@ -60,3 +61,4 @@ class Context(Mapping[ContextVar[Any], Any]):
|
||||
def __getitem__(self, __key: ContextVar[_T]) -> _T: ...
|
||||
def __iter__(self) -> Iterator[ContextVar[Any]]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
|
||||
@@ -36,6 +36,7 @@ class timezone(tzinfo):
|
||||
def utcoffset(self, __dt: datetime | None) -> timedelta: ...
|
||||
def dst(self, __dt: datetime | None) -> None: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
UTC: timezone
|
||||
@@ -87,6 +88,7 @@ class date:
|
||||
def __lt__(self, __value: date) -> bool: ...
|
||||
def __ge__(self, __value: date) -> bool: ...
|
||||
def __gt__(self, __value: date) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __add__(self, __value: timedelta) -> Self: ...
|
||||
def __radd__(self, __value: timedelta) -> Self: ...
|
||||
@@ -145,6 +147,7 @@ class time:
|
||||
def __lt__(self, __value: time) -> bool: ...
|
||||
def __ge__(self, __value: time) -> bool: ...
|
||||
def __gt__(self, __value: time) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def isoformat(self, timespec: str = ...) -> str: ...
|
||||
@classmethod
|
||||
@@ -219,6 +222,7 @@ class timedelta:
|
||||
def __lt__(self, __value: timedelta) -> bool: ...
|
||||
def __ge__(self, __value: timedelta) -> bool: ...
|
||||
def __gt__(self, __value: timedelta) -> bool: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
@@ -310,6 +314,8 @@ class datetime(date):
|
||||
def __lt__(self, __value: datetime) -> bool: ... # type: ignore[override]
|
||||
def __ge__(self, __value: datetime) -> bool: ... # type: ignore[override]
|
||||
def __gt__(self, __value: datetime) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
@overload # type: ignore[override]
|
||||
def __sub__(self, __value: timedelta) -> Self: ...
|
||||
|
||||
@@ -190,6 +190,7 @@ class Enum(metaclass=EnumMeta):
|
||||
# and in practice using `object` here has the same effect as using `Any`.
|
||||
def __new__(cls, value: object) -> Self: ...
|
||||
def __dir__(self) -> list[str]: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __format__(self, format_spec: str) -> str: ...
|
||||
def __reduce_ex__(self, proto: Unused) -> tuple[Any, ...]: ...
|
||||
|
||||
|
||||
@@ -148,3 +148,4 @@ class ExtensionFileLoader(importlib.abc.ExecutionLoader):
|
||||
def exec_module(self, module: types.ModuleType) -> None: ...
|
||||
def get_code(self, fullname: str) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
@@ -66,6 +66,9 @@ class EntryPoint(_EntryPointBase):
|
||||
extras: list[str] = ...,
|
||||
) -> bool: ... # undocumented
|
||||
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
class EntryPoints(list[EntryPoint]): # use as list is deprecated since 3.10
|
||||
# int argument is deprecated since 3.10
|
||||
|
||||
@@ -354,6 +354,7 @@ class Signature:
|
||||
def from_callable(cls, obj: _IntrospectableCallable, *, follow_wrapped: bool = True) -> Self: ...
|
||||
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def get_annotations(
|
||||
@@ -413,6 +414,7 @@ class Parameter:
|
||||
annotation: Any = ...,
|
||||
) -> Self: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class BoundArguments:
|
||||
arguments: OrderedDict[str, Any]
|
||||
|
||||
@@ -78,6 +78,7 @@ class _BaseNetwork(_IPAddressBase, Container[_A], Iterable[_A], Generic[_A]):
|
||||
def __getitem__(self, n: int) -> _A: ...
|
||||
def __iter__(self) -> Iterator[_A]: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __lt__(self, other: Self) -> bool: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __ge__(self, other: Self) -> bool: ...
|
||||
@@ -148,7 +149,10 @@ class _BaseV4:
|
||||
|
||||
class IPv4Address(_BaseV4, _BaseAddress): ...
|
||||
class IPv4Network(_BaseV4, _BaseNetwork[IPv4Address]): ...
|
||||
class IPv4Interface(IPv4Address, _BaseInterface[IPv4Address, IPv4Network]): ...
|
||||
|
||||
class IPv4Interface(IPv4Address, _BaseInterface[IPv4Address, IPv4Network]):
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class _BaseV6:
|
||||
@property
|
||||
@@ -169,11 +173,16 @@ class IPv6Address(_BaseV6, _BaseAddress):
|
||||
@property
|
||||
def scope_id(self) -> str | None: ...
|
||||
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class IPv6Network(_BaseV6, _BaseNetwork[IPv6Address]):
|
||||
@property
|
||||
def is_site_local(self) -> bool: ...
|
||||
|
||||
class IPv6Interface(IPv6Address, _BaseInterface[IPv6Address, IPv6Network]): ...
|
||||
class IPv6Interface(IPv6Address, _BaseInterface[IPv6Address, IPv6Network]):
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
def v4_int_to_packed(address: int) -> bytes: ...
|
||||
def v6_int_to_packed(address: int) -> bytes: ...
|
||||
|
||||
@@ -175,6 +175,8 @@ class Pattern(Generic[AnyStr]):
|
||||
def subn(self, repl: AnyStr | Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = 0) -> tuple[AnyStr, int]: ...
|
||||
def __copy__(self) -> Pattern[AnyStr]: ...
|
||||
def __deepcopy__(self, __memo: Any) -> Pattern[AnyStr]: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
|
||||
@@ -485,6 +485,7 @@ class SSLSession:
|
||||
def time(self) -> int: ...
|
||||
@property
|
||||
def timeout(self) -> int: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
|
||||
class SSLErrorNumber(enum.IntEnum):
|
||||
SSL_ERROR_EOF: int
|
||||
|
||||
@@ -37,6 +37,7 @@ class Statistic:
|
||||
traceback: Traceback
|
||||
def __init__(self, traceback: Traceback, size: int, count: int) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class StatisticDiff:
|
||||
count: int
|
||||
@@ -46,6 +47,7 @@ class StatisticDiff:
|
||||
traceback: Traceback
|
||||
def __init__(self, traceback: Traceback, size: int, size_diff: int, count: int, count_diff: int) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
_FrameTuple: TypeAlias = tuple[str, int]
|
||||
|
||||
@@ -56,6 +58,7 @@ class Frame:
|
||||
def lineno(self) -> int: ...
|
||||
def __init__(self, frame: _FrameTuple) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __lt__(self, other: Frame) -> bool: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __gt__(self, other: Frame) -> bool: ...
|
||||
@@ -80,6 +83,7 @@ class Trace:
|
||||
def traceback(self) -> Traceback: ...
|
||||
def __init__(self, trace: _TraceTuple) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class Traceback(Sequence[Frame]):
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -97,6 +101,7 @@ class Traceback(Sequence[Frame]):
|
||||
def __contains__(self, frame: Frame) -> bool: ... # type: ignore[override]
|
||||
def __len__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __lt__(self, other: Traceback) -> bool: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __gt__(self, other: Traceback) -> bool: ...
|
||||
|
||||
@@ -71,6 +71,7 @@ class _Cell:
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(self, __contents: object = ...) -> None: ...
|
||||
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
cell_contents: Any
|
||||
|
||||
@@ -113,6 +114,8 @@ LambdaType = FunctionType
|
||||
|
||||
@final
|
||||
class CodeType:
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@property
|
||||
def co_argcount(self) -> int: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
@@ -326,6 +329,7 @@ class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):
|
||||
class SimpleNamespace:
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def __init__(self, **kwargs: Any) -> None: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __getattribute__(self, __name: str) -> Any: ...
|
||||
def __setattr__(self, __name: str, __value: Any) -> None: ...
|
||||
def __delattr__(self, __name: str) -> None: ...
|
||||
@@ -442,6 +446,8 @@ class MethodType:
|
||||
def __qualname__(self) -> str: ... # inherited from the added function
|
||||
def __init__(self, __func: Callable[..., Any], __obj: object) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
@final
|
||||
class BuiltinFunctionType:
|
||||
@@ -452,6 +458,8 @@ class BuiltinFunctionType:
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
BuiltinMethodType = BuiltinFunctionType
|
||||
|
||||
@@ -479,6 +487,7 @@ class MethodWrapperType:
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __ne__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
@final
|
||||
class MethodDescriptorType:
|
||||
@@ -603,6 +612,8 @@ if sys.version_info >= (3, 9):
|
||||
def __parameters__(self) -> tuple[Any, ...]: ...
|
||||
def __init__(self, origin: type, args: Any) -> None: ...
|
||||
def __getitem__(self, __typeargs: Any) -> GenericAlias: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
@property
|
||||
def __unpacked__(self) -> bool: ...
|
||||
@@ -626,3 +637,5 @@ if sys.version_info >= (3, 10):
|
||||
def __args__(self) -> tuple[Any, ...]: ...
|
||||
def __or__(self, __value: Any) -> UnionType: ...
|
||||
def __ror__(self, __value: Any) -> UnionType: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
@@ -226,12 +226,14 @@ if sys.version_info >= (3, 10):
|
||||
@property
|
||||
def __origin__(self) -> ParamSpec: ...
|
||||
def __init__(self, origin: ParamSpec) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@_final
|
||||
class ParamSpecKwargs:
|
||||
@property
|
||||
def __origin__(self) -> ParamSpec: ...
|
||||
def __init__(self, origin: ParamSpec) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@_final
|
||||
class ParamSpec:
|
||||
@@ -563,6 +565,7 @@ class AbstractSet(Collection[_T_co], Generic[_T_co]):
|
||||
def __or__(self, other: AbstractSet[_T]) -> AbstractSet[_T_co | _T]: ...
|
||||
def __sub__(self, other: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
|
||||
def __xor__(self, other: AbstractSet[_T]) -> AbstractSet[_T_co | _T]: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def isdisjoint(self, other: Iterable[Any]) -> bool: ...
|
||||
|
||||
class MutableSet(AbstractSet[_T], Generic[_T]):
|
||||
|
||||
@@ -86,6 +86,7 @@ class TestCase:
|
||||
_testMethodDoc: str
|
||||
def __init__(self, methodName: str = "runTest") -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def setUp(self) -> None: ...
|
||||
def tearDown(self) -> None: ...
|
||||
@classmethod
|
||||
@@ -304,6 +305,8 @@ class FunctionTestCase(TestCase):
|
||||
description: str | None = None,
|
||||
) -> None: ...
|
||||
def runTest(self) -> None: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class _AssertRaisesContext(Generic[_E]):
|
||||
exception: _E
|
||||
|
||||
@@ -63,6 +63,7 @@ class UUID:
|
||||
def __le__(self, other: UUID) -> bool: ...
|
||||
def __gt__(self, other: UUID) -> bool: ...
|
||||
def __ge__(self, other: UUID) -> bool: ...
|
||||
def __hash__(self) -> builtins.int: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def getnode() -> int: ...
|
||||
|
||||
@@ -45,6 +45,7 @@ class WeakMethod(ref[_CallableT], Generic[_CallableT]):
|
||||
def __call__(self) -> _CallableT | None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class WeakValueDictionary(MutableMapping[_KT, _VT]):
|
||||
@overload
|
||||
|
||||
@@ -98,3 +98,4 @@ if sys.platform == "win32":
|
||||
) -> bool | None: ...
|
||||
def Close(self) -> None: ...
|
||||
def Detach(self) -> int: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
@@ -142,6 +142,7 @@ class QName:
|
||||
def __gt__(self, other: QName | str) -> bool: ...
|
||||
def __ge__(self, other: QName | str) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class ElementTree:
|
||||
def __init__(self, element: Element | None = None, file: _FileRead | None = None) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user