Merge pull request #79 from timabbott/sys.exit

Fix incorrect sys.exit() type.
This commit is contained in:
Guido van Rossum
2016-02-05 11:38:06 -08:00
2 changed files with 5 additions and 2 deletions

View File

@@ -109,7 +109,8 @@ def __excepthook__(type_: type, value: BaseException, traceback: TracebackType)
def exc_clear() -> None:
raise DeprecationWarning()
def exc_info() -> Tuple[type, BaseException, TracebackType]: ...
def exit(arg: int = ...) -> None:
# sys.exit() accepts an optional argument of anything printable
def exit(arg: Any = ...) -> None:
raise SystemExit()
def getcheckinterval() -> int: ... # deprecated
def getdefaultencoding() -> str: ...

View File

@@ -115,7 +115,9 @@ def displayhook(value: Optional[int]) -> None: ...
def excepthook(type_: type, value: BaseException,
traceback: TracebackType) -> None: ...
def exc_info() -> Tuple[type, BaseException, TracebackType]: ...
def exit(arg: Union[int, str] = ...) -> None: ...
# sys.exit() accepts an optional argument of anything printable
def exit(arg: Any = ...) -> None:
raise SystemExit()
def getcheckinterval() -> int: ... # deprecated
def getdefaultencoding() -> str: ...
def getdlopenflags() -> int: ... # Unix only