mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
make tracemalloc.Traceback instantiable (#2117)
This commit is contained in:
committed by
Guido van Rossum
parent
28f6c095d4
commit
f73351f5bf
@@ -1,7 +1,7 @@
|
||||
# Stubs for tracemalloc (Python 3.4+)
|
||||
|
||||
import sys
|
||||
from typing import Any, List, Optional, Sequence, Tuple, Union
|
||||
from typing import Any, List, Optional, Sequence, Tuple, Union, overload
|
||||
|
||||
def clear_traces() -> None: ...
|
||||
def get_object_traceback(obj: object) -> Optional[Traceback]: ...
|
||||
@@ -63,3 +63,8 @@ class Trace:
|
||||
|
||||
class Traceback(Sequence[Frame]):
|
||||
def format(self, limit: Optional[int] = ...) -> List[str]: ...
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> Frame: ...
|
||||
@overload
|
||||
def __getitem__(self, s: slice) -> Sequence[Frame]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user