stdlib: Add many missing dunder overrides (#7231)

This commit is contained in:
Alex Waygood
2022-02-16 14:25:47 +00:00
committed by GitHub
parent 409beea616
commit fbc279e3f5
28 changed files with 62 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ class Statistic:
size: int
traceback: Traceback
def __init__(self, traceback: Traceback, size: int, count: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
class StatisticDiff:
count: int
@@ -34,6 +35,7 @@ class StatisticDiff:
size_diff: int
traceback: Traceback
def __init__(self, traceback: Traceback, size: int, size_diff: int, count: int, count_diff: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
_FrameTupleT = tuple[str, int]
@@ -61,6 +63,7 @@ class Trace:
size: int
traceback: Traceback
def __init__(self, trace: _TraceTupleT) -> None: ...
def __eq__(self, other: object) -> bool: ...
class Traceback(Sequence[Frame]):
if sys.version_info >= (3, 9):
@@ -78,6 +81,7 @@ class Traceback(Sequence[Frame]):
@overload
def __getitem__(self, s: slice) -> Sequence[Frame]: ...
def __len__(self) -> int: ...
def __eq__(self, other: object) -> bool: ...
def __lt__(self, other: Traceback) -> bool: ...
if sys.version_info >= (3, 11):
def __gt__(self, other: Traceback) -> bool: ...