Add NoReturn (#811)

* Add NoReturn
This commit is contained in:
David Fisher
2017-01-04 13:38:05 -08:00
committed by Łukasz Langa
parent 93bb4604cb
commit 2cb8e184cc
9 changed files with 22 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ from typing import (
overload, Type,
)
from types import FrameType, ModuleType, TracebackType, ClassType
from mypy_extensions import NoReturn
class _flags:
bytes_warning = ... # type: int
@@ -118,7 +119,7 @@ def exc_info() -> Tuple[Optional[Type[BaseException]],
Optional[TracebackType]]: ...
# sys.exit() accepts an optional argument of anything printable
def exit(arg: Any = ...) -> None:
def exit(arg: Any = ...) -> NoReturn:
raise SystemExit()
def getcheckinterval() -> int: ... # deprecated
def getdefaultencoding() -> str: ...