summaryrefslogtreecommitdiffstats
path: root/Doc/library/optparse.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-21 09:40:37 (GMT)
committerGitHub <noreply@github.com>2023-07-21 09:40:37 (GMT)
commit4b9948617f91175783609769aa6160e5b49b9ccc (patch)
tree70ee26c5370423240516d52536ae9c23f64245c5 /Doc/library/optparse.rst
parentd036db728ea3d54509cbad06df74e2d9a31fbec8 (diff)
downloadcpython-4b9948617f91175783609769aa6160e5b49b9ccc.zip
cpython-4b9948617f91175783609769aa6160e5b49b9ccc.tar.gz
cpython-4b9948617f91175783609769aa6160e5b49b9ccc.tar.bz2
gh-106909: Use role :const: for referencing module constants (GH-106910)
Diffstat (limited to 'Doc/library/optparse.rst')
-rw-r--r--Doc/library/optparse.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 01177a0..015e83e 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -813,7 +813,7 @@ The first step in using :mod:`optparse` is to create an OptionParser instance.
help option. When :mod:`optparse` prints the usage string, it expands
``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you
passed that keyword argument). To suppress a usage message, pass the
- special value :data:`optparse.SUPPRESS_USAGE`.
+ special value :const:`optparse.SUPPRESS_USAGE`.
``option_list`` (default: ``[]``)
A list of Option objects to populate the parser with. The options in
@@ -1079,7 +1079,7 @@ relevant to a particular option, or fail to pass a required option attribute,
Help text to print for this option when listing all available options after
the user supplies a :attr:`~Option.help` option (such as ``--help``). If
no help text is supplied, the option will be listed without help text. To
- hide this option, use the special value :data:`optparse.SUPPRESS_HELP`.
+ hide this option, use the special value :const:`optparse.SUPPRESS_HELP`.
.. attribute:: Option.metavar
@@ -1251,7 +1251,7 @@ must specify for any option using that action.
If no :attr:`~Option.help` string is supplied for an option, it will still be
listed in the help message. To omit an option entirely, use the special value
- :data:`optparse.SUPPRESS_HELP`.
+ :const:`optparse.SUPPRESS_HELP`.
:mod:`optparse` automatically adds a :attr:`~Option.help` option to all
OptionParsers, so you do not normally need to create one.
@@ -1522,7 +1522,7 @@ OptionParser supports several other public methods:
Set the usage string according to the rules described above for the ``usage``
constructor keyword argument. Passing ``None`` sets the default usage
- string; use :data:`optparse.SUPPRESS_USAGE` to suppress a usage message.
+ string; use :const:`optparse.SUPPRESS_USAGE` to suppress a usage message.
.. method:: OptionParser.print_usage(file=None)