mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +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 _typeshed import SupportsWrite, Unused
|
||||
from collections.abc import Generator, Iterable, Iterator, Mapping
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, Literal, overload
|
||||
from typing import Any, ClassVar, Literal, overload
|
||||
from typing_extensions import Self, TypeAlias, deprecated
|
||||
|
||||
__all__ = [
|
||||
@@ -229,6 +229,7 @@ class TracebackException:
|
||||
) -> Self: ...
|
||||
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
if sys.version_info >= (3, 11):
|
||||
def format(self, *, chain: bool = True, _ctx: _ExceptionPrintContext | None = None) -> Generator[str, None, None]: ...
|
||||
else:
|
||||
@@ -292,6 +293,7 @@ class FrameSummary:
|
||||
def __iter__(self) -> Iterator[Any]: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __len__(self) -> Literal[4]: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
class StackSummary(list[FrameSummary]):
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user