only use typing_extensions to import _AnnotatedAlias

This commit is contained in:
honglei 2023-08-25 21:43:02 +08:00
parent dcb406f0ed
commit d13fb7435b

View File

@ -55,9 +55,6 @@ if sys.version_info >= (3, 8):
else: else:
from typing_extensions import get_args, get_origin from typing_extensions import get_args, get_origin
if sys.version_info >= (3, 9):
from typing import Annotated, _AnnotatedAlias
else:
from typing_extensions import Annotated, _AnnotatedAlias from typing_extensions import Annotated, _AnnotatedAlias
_T = TypeVar("_T") _T = TypeVar("_T")