diff --git a/stdlib/2/sys.pyi b/stdlib/2/sys.pyi index e67b26325af1..2b38c6da0c49 100644 --- a/stdlib/2/sys.pyi +++ b/stdlib/2/sys.pyi @@ -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 diff --git a/stdlib/3/sys.pyi b/stdlib/3/sys.pyi index 3f856bbc9c76..911ff4fe9344 100644 --- a/stdlib/3/sys.pyi +++ b/stdlib/3/sys.pyi @@ -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