From e1ae89874b4f1c6782b84c16c825400179008489 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Fri, 24 Dec 2021 10:11:00 +0100 Subject: [PATCH] Let 'traceback' possibly be None in sys.__excepthook__ (#6678) --- stdlib/sys.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/sys.pyi b/stdlib/sys.pyi index 274e4b90f..b58298844 100644 --- a/stdlib/sys.pyi +++ b/stdlib/sys.pyi @@ -161,7 +161,7 @@ def _current_frames() -> dict[int, FrameType]: ... def _getframe(__depth: int = ...) -> FrameType: ... def _debugmallocstats() -> None: ... def __displayhook__(value: object) -> None: ... -def __excepthook__(type_: Type[BaseException], value: BaseException, traceback: TracebackType) -> None: ... +def __excepthook__(type_: Type[BaseException], value: BaseException, traceback: TracebackType | None) -> None: ... def exc_info() -> _OptExcInfo: ... # sys.exit() accepts an optional argument of anything printable