Skip to content

Commit ab8f546

Browse files
gh-103921: Rename "type" header in argparse docs (#104654)
This allows :keyword:`type` to link to docs for the new `type` statement (being written in gh-104642) instead of to this header in the argparse docs.
1 parent a412fc5 commit ab8f546

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Doc/library/argparse.rst

+15-15
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,20 @@ the extracted data in a :class:`argparse.Namespace` object::
5757
Quick Links for add_argument()
5858
------------------------------
5959

60-
====================== =========================================================== ==========================================================================================================================
61-
Name Description Values
62-
====================== =========================================================== ==========================================================================================================================
63-
action_ Specify how an argument should be handled ``'store'``, ``'store_const'``, ``'store_true'``, ``'append'``, ``'append_const'``, ``'count'``, ``'help'``, ``'version'``
64-
choices_ Limit values to a specific set of choices ``['foo', 'bar']``, ``range(1, 10)``, or :class:`~collections.abc.Container` instance
65-
const_ Store a constant value
66-
default_ Default value used when an argument is not provided Defaults to ``None``
67-
dest_ Specify the attribute name used in the result namespace
68-
help_ Help message for an argument
69-
metavar_ Alternate display name for the argument as shown in help
70-
nargs_ Number of times the argument can be used :class:`int`, ``'?'``, ``'*'``, or ``'+'``
71-
required_ Indicate whether an argument is required or optional ``True`` or ``False``
72-
type_ Automatically convert an argument to the given type :class:`int`, :class:`float`, ``argparse.FileType('w')``, or callable function
73-
====================== =========================================================== ==========================================================================================================================
60+
============================ =========================================================== ==========================================================================================================================
61+
Name Description Values
62+
============================ =========================================================== ==========================================================================================================================
63+
action_ Specify how an argument should be handled ``'store'``, ``'store_const'``, ``'store_true'``, ``'append'``, ``'append_const'``, ``'count'``, ``'help'``, ``'version'``
64+
choices_ Limit values to a specific set of choices ``['foo', 'bar']``, ``range(1, 10)``, or :class:`~collections.abc.Container` instance
65+
const_ Store a constant value
66+
default_ Default value used when an argument is not provided Defaults to ``None``
67+
dest_ Specify the attribute name used in the result namespace
68+
help_ Help message for an argument
69+
metavar_ Alternate display name for the argument as shown in help
70+
nargs_ Number of times the argument can be used :class:`int`, ``'?'``, ``'*'``, or ``'+'``
71+
required_ Indicate whether an argument is required or optional ``True`` or ``False``
72+
:ref:`type <argparse-type>` Automatically convert an argument to the given type :class:`int`, :class:`float`, ``argparse.FileType('w')``, or callable function
73+
============================ =========================================================== ==========================================================================================================================
7474

7575

7676
Example
@@ -1132,7 +1132,7 @@ command-line argument was not present::
11321132
Namespace(foo='1')
11331133

11341134

1135-
.. _type:
1135+
.. _argparse-type:
11361136

11371137
type
11381138
^^^^

0 commit comments

Comments
 (0)