From c17d0120a948e7c1b4e66e4aeb32c41967f17e8b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 25 Jan 2016 18:05:53 -0800 Subject: [PATCH] Add stubs for traceback.format_exception. --- stdlib/2.7/traceback.pyi | 1 + stdlib/3/traceback.pyi | 1 + 2 files changed, 2 insertions(+) diff --git a/stdlib/2.7/traceback.pyi b/stdlib/2.7/traceback.pyi index c00e8fbb3..b40710707 100644 --- a/stdlib/2.7/traceback.pyi +++ b/stdlib/2.7/traceback.pyi @@ -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: ... diff --git a/stdlib/3/traceback.pyi b/stdlib/3/traceback.pyi index 7fca4aa65..d0cc403a4 100644 --- a/stdlib/3/traceback.pyi +++ b/stdlib/3/traceback.pyi @@ -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: ...