mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Add type stub for sys._current_exceptions (#14937)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -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: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user