|
1 | 1 | import sys |
2 | 2 | from _tracemalloc import * |
3 | | -from typing import Optional, Sequence, Union, overload |
| 3 | +from typing import Any, Optional, Sequence, Union, overload |
4 | 4 | from typing_extensions import SupportsIndex |
5 | 5 |
|
6 | 6 | def get_object_traceback(obj: object) -> Traceback | None: ... |
@@ -41,6 +41,15 @@ class Frame: |
41 | 41 | filename: str |
42 | 42 | lineno: int |
43 | 43 | def __init__(self, frame: _FrameTupleT) -> None: ... |
| 44 | + def __lt__(self, other: Frame) -> bool: ... |
| 45 | + if sys.version_info >= (3, 11): |
| 46 | + def __gt__(self, other: Frame) -> bool: ... |
| 47 | + def __ge__(self, other: Frame) -> bool: ... |
| 48 | + def __le__(self, other: Frame) -> bool: ... |
| 49 | + else: |
| 50 | + def __gt__(self, other: Frame, NotImplemented: Any = ...) -> bool: ... |
| 51 | + def __ge__(self, other: Frame, NotImplemented: Any = ...) -> bool: ... |
| 52 | + def __le__(self, other: Frame, NotImplemented: Any = ...) -> bool: ... |
44 | 53 |
|
45 | 54 | if sys.version_info >= (3, 9): |
46 | 55 | _TraceTupleT = Union[tuple[int, int, Sequence[_FrameTupleT], Optional[int]], tuple[int, int, Sequence[_FrameTupleT]]] |
@@ -69,6 +78,15 @@ class Traceback(Sequence[Frame]): |
69 | 78 | @overload |
70 | 79 | def __getitem__(self, s: slice) -> Sequence[Frame]: ... |
71 | 80 | def __len__(self) -> int: ... |
| 81 | + def __lt__(self, other: Traceback) -> bool: ... |
| 82 | + if sys.version_info >= (3, 11): |
| 83 | + def __gt__(self, other: Traceback) -> bool: ... |
| 84 | + def __ge__(self, other: Traceback) -> bool: ... |
| 85 | + def __le__(self, other: Traceback) -> bool: ... |
| 86 | + else: |
| 87 | + def __gt__(self, other: Traceback, NotImplemented: Any = ...) -> bool: ... |
| 88 | + def __ge__(self, other: Traceback, NotImplemented: Any = ...) -> bool: ... |
| 89 | + def __le__(self, other: Traceback, NotImplemented: Any = ...) -> bool: ... |
72 | 90 |
|
73 | 91 | class Snapshot: |
74 | 92 | def __init__(self, traces: Sequence[_TraceTupleT], traceback_limit: int) -> None: ... |
|
0 commit comments