Add typing_extensions.is_typeddict (#6923)

This commit is contained in:
Jelle Zijlstra
2022-01-15 17:02:23 -08:00
committed by GitHub
parent f55dff80f0
commit e53aa04eb2

View File

@@ -99,7 +99,13 @@ class SupportsIndex(Protocol, metaclass=abc.ABCMeta):
# PEP 612 support for Python < 3.9
if sys.version_info >= (3, 10):
from typing import Concatenate as Concatenate, ParamSpec as ParamSpec, TypeAlias as TypeAlias, TypeGuard as TypeGuard
from typing import (
Concatenate as Concatenate,
ParamSpec as ParamSpec,
TypeAlias as TypeAlias,
TypeGuard as TypeGuard,
is_typeddict as is_typeddict,
)
else:
class ParamSpecArgs:
__origin__: ParamSpec
@@ -122,3 +128,4 @@ else:
Concatenate: _SpecialForm = ...
TypeAlias: _SpecialForm = ...
TypeGuard: _SpecialForm = ...
def is_typeddict(tp: object) -> bool: ...