py312: Fix stubtest nits in typing/typing_extensions (#10659)

This commit is contained in:
Alex Waygood
2023-09-04 15:39:11 +01:00
committed by GitHub
parent d868dad76b
commit 433204fb8f
7 changed files with 30 additions and 16 deletions

View File

@@ -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__(