add some Optionals to traceback.pyi (#2044)

Fixes #1974
This commit is contained in:
Jelle Zijlstra
2018-04-12 12:29:07 -07:00
committed by Łukasz Langa
parent 840f34147e
commit b8b78886e3

View File

@@ -41,11 +41,11 @@ else:
def extract_stack(f: Optional[FrameType] = ...,
limit: Optional[int] = ...) -> List[_PT]: ...
def format_list(extracted_list: List[_PT]) -> List[str]: ...
def format_exception_only(etype: Type[BaseException],
value: BaseException) -> List[str]: ...
def format_exception_only(etype: Optional[Type[BaseException]],
value: Optional[BaseException]) -> List[str]: ...
if sys.version_info >= (3,):
def format_exception(etype: Type[BaseException], value: BaseException,
tb: TracebackType, limit: Optional[int] = ...,
def format_exception(etype: Optional[Type[BaseException]], value: Optional[BaseException],
tb: Optional[TracebackType], limit: Optional[int] = ...,
chain: bool = ...) -> List[str]: ...
def format_exc(limit: Optional[int] = ..., chain: bool = ...) -> str: ...
else: