diff --git a/stdlib/2.7/sys.pyi b/stdlib/2.7/sys.pyi index a1c0247ddbff..3576159351f6 100644 --- a/stdlib/2.7/sys.pyi +++ b/stdlib/2.7/sys.pyi @@ -108,7 +108,11 @@ def __displayhook__(value: int) -> None: ... def __excepthook__(type_: type, value: BaseException, traceback: TracebackType) -> None: ... def exc_clear() -> None: raise DeprecationWarning() -def exc_info() -> Tuple[type, BaseException, TracebackType]: ... +# TODO should be a union of tuple, see mypy#1178 +def exc_info() -> Tuple[Optional[type], + Optional[BaseException], + Optional[TracebackType]]: ... + # sys.exit() accepts an optional argument of anything printable def exit(arg: Any = ...) -> None: raise SystemExit() diff --git a/stdlib/3/sys.pyi b/stdlib/3/sys.pyi index accaadf0a3bf..e65d792e281f 100644 --- a/stdlib/3/sys.pyi +++ b/stdlib/3/sys.pyi @@ -117,7 +117,10 @@ def _current_frames() -> Dict[int, Any]: ... def displayhook(value: Optional[int]) -> None: ... def excepthook(type_: type, value: BaseException, traceback: TracebackType) -> None: ... -def exc_info() -> Tuple[type, BaseException, TracebackType]: ... +# TODO should be a union of tuple, see mypy#1178 +def exc_info() -> Tuple[Optional[type], + Optional[BaseException], + Optional[TracebackType]]: ... # sys.exit() accepts an optional argument of anything printable def exit(arg: Any = ...) -> None: raise SystemExit()