mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Stdlib: add many missing __hash__ and __eq__ methods (#10464)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user