From d929cd27b956cf02771b2bfeddd398aebc3974e1 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Fri, 24 Dec 2021 09:14:39 +0100 Subject: [PATCH] Let 'traceback' possibly be None in sys.__excepthook__ Follow-up on 373c4e582a76524161bd68009975bc96224c7d37. --- stdlib/sys.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/sys.pyi b/stdlib/sys.pyi index 274e4b90fd6e..b5829884482a 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