sys: refine the return type of sys.exc_info() (#3111)

This commit is contained in:
Ran Benita
2019-07-11 11:43:37 +03:00
committed by Sebastian Rittau
parent b43e1d674f
commit 4ae4714e00
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ from types import FrameType, ModuleType, TracebackType, ClassType
# The following type alias are stub-only and do not exist during runtime
_ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType]
_OptExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
_OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]]
class _flags:
bytes_warning: int

View File

@@ -16,7 +16,7 @@ _T = TypeVar('_T')
# The following type alias are stub-only and do not exist during runtime
_ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType]
_OptExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
_OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]]
# ----- sys variables -----
abiflags: str