fix sys.exc_info return type (#246)

This commit is contained in:
Valérian Rousset authored and Guido van Rossum committed 2016-06-06 08:52:40 -07:00
1 parent 4039a1a686
commit c40a260b47
2 files changed
+9 -2

No files matched your search

+5 -1
View File
@@ -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()
+4 -1
View File
@@ -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()