11import sys
2- from typing import IO , Any , Callable , Generator , Generic , Iterable , NoReturn , Pattern , Protocol , Sequence , Type , TypeVar , overload
2+ from typing import IO , Any , Callable , Generator , Generic , Iterable , NoReturn , Pattern , Protocol , Sequence , TypeVar , overload
33
44_T = TypeVar ("_T" )
55_ActionT = TypeVar ("_ActionT" , bound = Action )
@@ -47,7 +47,7 @@ class _ActionsContainer:
4747 def add_argument (
4848 self ,
4949 * name_or_flags : str ,
50- action : str | Type [Action ] = ...,
50+ action : str | type [Action ] = ...,
5151 nargs : int | str = ...,
5252 const : Any = ...,
5353 default : Any = ...,
@@ -67,7 +67,7 @@ class _ActionsContainer:
6767 def _add_container_actions (self , container : _ActionsContainer ) -> None : ...
6868 def _get_positional_kwargs (self , dest : str , ** kwargs : Any ) -> dict [str , Any ]: ...
6969 def _get_optional_kwargs (self , * args : Any , ** kwargs : Any ) -> dict [str , Any ]: ...
70- def _pop_action_class (self , kwargs : Any , default : Type [Action ] | None = ...) -> Type [Action ]: ...
70+ def _pop_action_class (self , kwargs : Any , default : type [Action ] | None = ...) -> type [Action ]: ...
7171 def _get_handler (self ) -> Callable [[Action , Iterable [tuple [str , Action ]]], Any ]: ...
7272 def _check_conflict (self , action : Action ) -> None : ...
7373 def _handle_conflict_error (self , action : Action , conflicting_actions : Iterable [tuple [str , Action ]]) -> NoReturn : ...
@@ -143,7 +143,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
143143 title : str = ...,
144144 description : str | None = ...,
145145 prog : str = ...,
146- action : Type [Action ] = ...,
146+ action : type [Action ] = ...,
147147 option_string : str = ...,
148148 dest : str | None = ...,
149149 required : bool = ...,
@@ -157,8 +157,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
157157 title : str = ...,
158158 description : str | None = ...,
159159 prog : str = ...,
160- parser_class : Type [_ArgumentParserT ] = ...,
161- action : Type [Action ] = ...,
160+ parser_class : type [_ArgumentParserT ] = ...,
161+ action : type [Action ] = ...,
162162 option_string : str = ...,
163163 dest : str | None = ...,
164164 required : bool = ...,
@@ -173,7 +173,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
173173 title : str = ...,
174174 description : str | None = ...,
175175 prog : str = ...,
176- action : Type [Action ] = ...,
176+ action : type [Action ] = ...,
177177 option_string : str = ...,
178178 dest : str | None = ...,
179179 help : str | None = ...,
@@ -186,8 +186,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
186186 title : str = ...,
187187 description : str | None = ...,
188188 prog : str = ...,
189- parser_class : Type [_ArgumentParserT ] = ...,
190- action : Type [Action ] = ...,
189+ parser_class : type [_ArgumentParserT ] = ...,
190+ action : type [Action ] = ...,
191191 option_string : str = ...,
192192 dest : str | None = ...,
193193 help : str | None = ...,
@@ -237,7 +237,7 @@ class HelpFormatter:
237237 _current_section : Any
238238 _whitespace_matcher : Pattern [str ]
239239 _long_break_matcher : Pattern [str ]
240- _Section : Type [Any ] # Nested class
240+ _Section : type [Any ] # Nested class
241241 def __init__ (self , prog : str , indent_increment : int = ..., max_help_position : int = ..., width : int | None = ...) -> None : ...
242242 def _indent (self ) -> None : ...
243243 def _dedent (self ) -> None : ...
@@ -410,9 +410,9 @@ class _VersionAction(Action):
410410
411411# undocumented
412412class _SubParsersAction (Action , Generic [_ArgumentParserT ]):
413- _ChoicesPseudoAction : Type [Any ] # nested class
413+ _ChoicesPseudoAction : type [Any ] # nested class
414414 _prog_prefix : str
415- _parser_class : Type [_ArgumentParserT ]
415+ _parser_class : type [_ArgumentParserT ]
416416 _name_parser_map : dict [str , _ArgumentParserT ]
417417 choices : dict [str , _ArgumentParserT ]
418418 _choices_actions : list [Action ]
@@ -421,7 +421,7 @@ class _SubParsersAction(Action, Generic[_ArgumentParserT]):
421421 self ,
422422 option_strings : Sequence [str ],
423423 prog : str ,
424- parser_class : Type [_ArgumentParserT ],
424+ parser_class : type [_ArgumentParserT ],
425425 dest : str = ...,
426426 required : bool = ...,
427427 help : str | None = ...,
@@ -432,7 +432,7 @@ class _SubParsersAction(Action, Generic[_ArgumentParserT]):
432432 self ,
433433 option_strings : Sequence [str ],
434434 prog : str ,
435- parser_class : Type [_ArgumentParserT ],
435+ parser_class : type [_ArgumentParserT ],
436436 dest : str = ...,
437437 help : str | None = ...,
438438 metavar : str | tuple [str , ...] | None = ...,
0 commit comments