Skip to content

Commit 59a1ad9

Browse files
adding the depreceated tag
1 parent e3af10b commit 59a1ad9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/argparse.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,7 @@ Sub-commands
16741674
called with no arguments and returns a special action object. This object
16751675
has a single method, :meth:`~_SubParsersAction.add_parser`:
16761676

1677-
.. method:: _SubParsersAction.add_parser(name, *, help=None, aliases=None, **kwargs)
1677+
.. method:: _SubParsersAction.add_parser(name, *, help=None, aliases=None, deprecated=False, **kwargs)
16781678

16791679
Creates and returns a new :class:`!ArgumentParser` object for the
16801680
subcommand *name*.
@@ -1686,6 +1686,8 @@ Sub-commands
16861686
:param aliases: A list or sequence of strings that can be used as
16871687
alternative names for this sub-command (e.g., ``aliases=['r']``
16881688
for a ``'run'`` command).
1689+
:param deprecated:If :const:`True`, marks the sub-command as deprecated,
1690+
which typically issues a warning when used.
16891691
:param kwargs: All other keyword arguments are passed directly to the
16901692
:class:`!ArgumentParser` constructor.
16911693

0 commit comments

Comments
 (0)