New additions to typing, typing_extensions (#7169)

This commit is contained in:
Jelle Zijlstra
2022-02-08 22:40:09 -08:00
committed by GitHub
parent b0202f71eb
commit 7dd2485269
2 changed files with 30 additions and 4 deletions

View File

@@ -66,6 +66,10 @@ if sys.version_info >= (3, 8):
# TypedDict is a (non-subscriptable) special form.
TypedDict: object
if sys.version_info >= (3, 11):
Self: _SpecialForm
Never: _SpecialForm = ...
if sys.version_info < (3, 7):
class GenericMeta(type): ...
@@ -697,6 +701,10 @@ def cast(typ: str, val: Any) -> Any: ...
@overload
def cast(typ: object, val: Any) -> Any: ...
if sys.version_info >= (3, 11):
def reveal_type(__obj: _T) -> _T: ...
def assert_never(__arg: Never) -> Never: ...
# Type constructors
class NamedTuple(tuple[Any, ...]):