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

@@ -1,6 +1,11 @@
from typing import Dict, Type, TypeVar
from typing import Dict, Type, TypeVar, Union
T = TypeVar('T')
def TypedDict(typename: str, fields: Dict[str, Type[T]]) -> Type[dict]: ...
# Return type that indicates a function does not return.
# This type is equivalent to the None type, but the no-op Union is necessary to
# distinguish the None type from the None value.
NoReturn = Union[None]