Update for typing_extensions 4.10 (#11438)

This commit is contained in:
Jelle Zijlstra
2024-02-18 00:59:48 -08:00
committed by GitHub
parent e5d25a7605
commit 705744af4c
2 changed files with 11 additions and 2 deletions

View File

@@ -182,6 +182,7 @@ __all__ = [
"no_type_check",
"no_type_check_decorator",
"ReadOnly",
"TypeIs",
]
_T = typing.TypeVar("_T")
@@ -220,10 +221,14 @@ def IntVar(name: str) -> Any: ... # returns a new TypeVar
class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
__required_keys__: ClassVar[frozenset[str]]
__optional_keys__: ClassVar[frozenset[str]]
__readonly_keys__: ClassVar[frozenset[str]]
__mutable_keys__: ClassVar[frozenset[str]]
__total__: ClassVar[bool]
__orig_bases__: ClassVar[tuple[Any, ...]]
# PEP 705
__readonly_keys__: ClassVar[frozenset[str]]
__mutable_keys__: ClassVar[frozenset[str]]
# PEP 728
__closed__: ClassVar[bool]
__extra_items__: ClassVar[Any]
def copy(self) -> Self: ...
# Using Never so that only calls using mypy plugin hook that specialize the signature
# can go through.
@@ -501,3 +506,4 @@ class Doc:
def __eq__(self, other: object) -> bool: ...
ReadOnly: _SpecialForm
TypeIs: _SpecialForm

View File

@@ -519,6 +519,9 @@ _typeshed.* # Utility types for typeshed, doesn't exist at runtime
typing._SpecialForm.__call__
typing._SpecialForm.__init__
# Should go away with a future version of stubtest
typing_extensions\..*\.__non_callable_proto_members__
# Pretend typing.ByteString is a Union, to better match its documented semantics.
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
# because it's not an ABC that makes any sense and was deprecated in 3.12