Add type stub for sys._current_exceptions (#14937)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Guo Ci
2025-10-29 10:38:22 -04:00
committed by GitHub
parent eb746bea3f
commit de2a42713a
+7
View File
@@ -354,6 +354,13 @@ else:
def _current_frames() -> dict[int, FrameType]: ...
def _getframe(depth: int = 0, /) -> FrameType: ...
# documented -- see https://docs.python.org/3/library/sys.html#sys._current_exceptions
if sys.version_info >= (3, 12):
def _current_exceptions() -> dict[int, BaseException | None]: ...
else:
def _current_exceptions() -> dict[int, OptExcInfo]: ...
if sys.version_info >= (3, 12):
def _getframemodulename(depth: int = 0) -> str | None: ...