fix return type for traceback.format_exception (#326)

format_exception and format_exception_only both return lists of
strings, not strings.
This commit is contained in:
OrenLeaffer
2016-07-01 16:03:25 -07:00
committed by Guido van Rossum
parent ab08dbbf09
commit 998d787302
2 changed files with 4 additions and 4 deletions

View File

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