mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
py312: Fix stubtest nits in typing/typing_extensions (#10659)
This commit is contained in:
@@ -126,6 +126,9 @@ if sys.version_info >= (3, 11):
|
||||
"reveal_type",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ += ["TypeAliasType", "override"]
|
||||
|
||||
ContextManager = AbstractContextManager
|
||||
AsyncContextManager = AbstractAsyncContextManager
|
||||
|
||||
@@ -323,7 +326,9 @@ AnyStr = TypeVar("AnyStr", str, bytes) # noqa: Y001
|
||||
|
||||
# Technically in 3.7 this inherited from GenericMeta. But let's not reflect that, since
|
||||
# type checkers tend to assume that Protocols all have the ABCMeta metaclass.
|
||||
class _ProtocolMeta(ABCMeta): ...
|
||||
class _ProtocolMeta(ABCMeta):
|
||||
if sys.version_info >= (3, 12):
|
||||
def __init__(cls, *args: Any, **kwargs: Any) -> None: ...
|
||||
|
||||
# Abstract base classes.
|
||||
|
||||
@@ -945,7 +950,7 @@ if sys.version_info >= (3, 10):
|
||||
def _type_repr(obj: object) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
def override(__arg: _F) -> _F: ...
|
||||
def override(__method: _F) -> _F: ...
|
||||
@_final
|
||||
class TypeAliasType:
|
||||
def __init__(
|
||||
|
||||
Reference in New Issue
Block a user