Skip to content

Commit

Permalink
fix sys.exc_info return type
Browse files Browse the repository at this point in the history
  • Loading branch information
tharvik committed Jun 6, 2016
1 parent a32d8a9 commit 4f7250c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion stdlib/2.7/sys.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 4 additions & 1 deletion stdlib/3/sys.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4f7250c

Please sign in to comment.