typing(_extensions) updates for 3.11 (#7643)

This commit is contained in:
Jelle Zijlstra
2022-04-16 12:42:12 -07:00
committed by GitHub
parent 499e74cf2a
commit bedf520d76
2 changed files with 35 additions and 12 deletions

View File

@@ -22,9 +22,12 @@ if sys.version_info >= (3, 11):
"ForwardRef",
"Generic",
"Literal",
"LiteralString",
"NotRequired",
"Optional",
"ParamSpec",
"Protocol",
"Required",
"Tuple",
"Type",
"TypeVar",
@@ -84,9 +87,11 @@ if sys.version_info >= (3, 11):
"assert_never",
"assert_type",
"cast",
"clear_overloads",
"final",
"get_args",
"get_origin",
"get_overloads",
"get_type_hints",
"is_typeddict",
"Never",
@@ -528,6 +533,9 @@ if sys.version_info >= (3, 11):
Self: _SpecialForm
Never: _SpecialForm = ...
Unpack: _SpecialForm
Required: _SpecialForm
NotRequired: _SpecialForm
LiteralString: _SpecialForm
class TypeVarTuple:
__name__: str
@@ -1180,6 +1188,8 @@ 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: ...
def clear_overloads() -> None: ...
def get_overloads(func: Callable[..., object]) -> Sequence[Callable[..., object]]: ...
# Type constructors