Add stubs for traceback.format_exception.

This commit is contained in:
Tim Abbott
2016-01-25 18:05:53 -08:00
committed by Guido van Rossum
parent 55830ec190
commit c17d0120a9
2 changed files with 2 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ def extract_tb(f: TracebackType, limit: int = ...) -> List[Tuple[str, int, str,
def extract_stack(f: FrameType = ..., limit: int = ...) -> None: ...
def format_list(list: List[Tuple[str, int, str, str]]) -> str: ...
def format_exception_only(type: type, value: List[str]) -> str: ...
def format_exception(type: type, value: List[str], tb: TracebackType, limit: int) -> str: ...
def format_tb(f: TracebackType, limit: int = ...) -> str: ...
def format_stack(f: FrameType = ..., limit: int = ...) -> str: ...
def tb_lineno(tb: TracebackType) -> AnyStr: ...

View File

@@ -4,6 +4,7 @@ import typing
# TODO signatures
def format_exception_only(etype, value): ...
def format_exception(type: type, value: List[str], tb: TracebackType, limit: int, chain: bool) -> str: ...
def format_tb(traceback): ...
def print_exc(limit=..., file=..., chain=...): ...
def format_exc(limit: int, chain: bool = ...) -> str: ...