@@ -123,6 +123,11 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
123
123
fromfile_prefix_chars : str | None
124
124
add_help : bool
125
125
allow_abbrev : bool
126
+ exit_on_error : bool
127
+
128
+ if sys .version_info >= (3 , 14 ):
129
+ suggest_on_error : bool
130
+ color : bool
126
131
127
132
# undocumented
128
133
_positionals : _ArgumentGroup
@@ -720,7 +725,33 @@ class _SubParsersAction(Action, Generic[_ArgumentParserT]):
720
725
721
726
# Note: `add_parser` accepts all kwargs of `ArgumentParser.__init__`. It also
722
727
# accepts its own `help` and `aliases` kwargs.
723
- if sys .version_info >= (3 , 13 ):
728
+ if sys .version_info >= (3 , 14 ):
729
+ def add_parser (
730
+ self ,
731
+ name : str ,
732
+ * ,
733
+ deprecated : bool = False ,
734
+ help : str | None = ...,
735
+ aliases : Sequence [str ] = ...,
736
+ # Kwargs from ArgumentParser constructor
737
+ prog : str | None = ...,
738
+ usage : str | None = ...,
739
+ description : str | None = ...,
740
+ epilog : str | None = ...,
741
+ parents : Sequence [_ArgumentParserT ] = ...,
742
+ formatter_class : _FormatterClass = ...,
743
+ prefix_chars : str = ...,
744
+ fromfile_prefix_chars : str | None = ...,
745
+ argument_default : Any = ...,
746
+ conflict_handler : str = ...,
747
+ add_help : bool = ...,
748
+ allow_abbrev : bool = ...,
749
+ exit_on_error : bool = ...,
750
+ suggest_on_error : bool = False ,
751
+ color : bool = False ,
752
+ ** kwargs : Any , # Accepting any additional kwargs for custom parser classes
753
+ ) -> _ArgumentParserT : ...
754
+ elif sys .version_info >= (3 , 13 ):
724
755
def add_parser (
725
756
self ,
726
757
name : str ,
0 commit comments