diff --git a/stdlib/argparse.pyi b/stdlib/argparse.pyi index 0f933e58d..759027d3a 100644 --- a/stdlib/argparse.pyi +++ b/stdlib/argparse.pyi @@ -1,7 +1,7 @@ import sys from collections.abc import Callable, Generator, Iterable, Sequence from typing import IO, Any, Generic, NewType, NoReturn, Pattern, Protocol, TypeVar, overload -from typing_extensions import Literal +from typing_extensions import Literal, TypeAlias if sys.version_info >= (3, 9): __all__ = [ @@ -53,11 +53,11 @@ _N = TypeVar("_N") # "store_false", "append", "append_const", "count", "help", "version", # "extend"], but using this would make it hard to annotate callers # that don't use a literal argument -_ActionStr = str +_ActionStr: TypeAlias = str # more precisely, Literal["?", "*", "+", "...", "A...", # "==SUPPRESS=="], but using this would make it hard to annotate # callers that don't use a literal argument -_NArgsStr = str +_NArgsStr: TypeAlias = str ONE_OR_MORE: Literal["+"] OPTIONAL: Literal["?"]