Skip to content

Commit

Permalink
Add typing.TypeVarTuple, Unpack, assert_type (#7501)
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Mar 18, 2022
1 parent 50107e6 commit 4d23919
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions stdlib/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ if sys.version_info >= (3, 11):
"Tuple",
"Type",
"TypeVar",
"TypeVarTuple",
"Union",
"Unpack",
"AbstractSet",
"ByteString",
"Container",
Expand Down Expand Up @@ -80,6 +82,7 @@ if sys.version_info >= (3, 11):
"TextIO",
"AnyStr",
"assert_never",
"assert_type",
"cast",
"final",
"get_args",
Expand Down Expand Up @@ -524,6 +527,12 @@ if sys.version_info >= (3, 8):
if sys.version_info >= (3, 11):
Self: _SpecialForm
Never: _SpecialForm = ...
Unpack: _SpecialForm

class TypeVarTuple:
__name__: str
def __init__(self, name: str) -> None: ...
def __iter__(self) -> Any: ...

if sys.version_info < (3, 7):
class GenericMeta(type): ...
Expand Down Expand Up @@ -1176,6 +1185,7 @@ 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: ...
def assert_type(__val: _T, __typ: Any) -> _T: ...

# Type constructors

Expand Down

0 comments on commit 4d23919

Please sign in to comment.