diff --git a/stdlib/2and3/traceback.pyi b/stdlib/2and3/traceback.pyi index ff34ad4cd..2b83b5dcb 100644 --- a/stdlib/2and3/traceback.pyi +++ b/stdlib/2and3/traceback.pyi @@ -7,7 +7,7 @@ import sys _PT = Tuple[str, int, str, Optional[str]] -def print_tb(tb: TracebackType, limit: Optional[int] = ..., +def print_tb(tb: Optional[TracebackType], limit: Optional[int] = ..., file: Optional[IO[str]] = ...) -> None: ... if sys.version_info >= (3,): def print_exception(etype: Type[BaseException], value: BaseException, @@ -28,7 +28,7 @@ else: file: Optional[IO[str]] = ...) -> None: ... def print_stack(f: Optional[FrameType] = ..., limit: Optional[int] = ..., file: Optional[IO[str]] = ...) -> None: ... -def extract_tb(tb: TracebackType, limit: Optional[int] = ...) -> List[_PT]: ... +def extract_tb(tb: Optional[TracebackType], limit: Optional[int] = ...) -> List[_PT]: ... def extract_stack(f: Optional[FrameType] = ..., limit: Optional[int] = ...) -> List[_PT]: ... def format_list(extracted_list: List[_PT]) -> List[str]: ... @@ -44,14 +44,14 @@ else: tb: TracebackType, limit: Optional[int] = ...) -> List[str]: ... def format_exc(limit: Optional[int] = ...) -> str: ... -def format_tb(tb: TracebackType, limit: Optional[int] = ...) -> List[str]: ... +def format_tb(tb: Optional[TracebackType], limit: Optional[int] = ...) -> List[str]: ... def format_stack(f: Optional[FrameType] = ..., limit: Optional[int] = ...) -> List[str]: ... if sys.version_info >= (3, 4): def clear_frames(tb: TracebackType) -> None: ... if sys.version_info >= (3, 5): def walk_stack(f: Optional[FrameType]) -> Iterator[Tuple[FrameType, int]]: ... - def walk_tb(tb: TracebackType) -> Iterator[Tuple[FrameType, int]]: ... + def walk_tb(tb: Optional[TracebackType]) -> Iterator[Tuple[FrameType, int]]: ... if sys.version_info < (3,): def tb_lineno(tb: TracebackType) -> int: ...