summaryrefslogtreecommitdiffstats
path: root/Doc/library/optparse.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-21 11:49:39 (GMT)
committerGitHub <noreply@github.com>2023-07-21 11:49:39 (GMT)
commit84e52171b541ecc01f2d738cf82f5d4199a4bce7 (patch)
treed71b78f93d8cc1c1baa5c45435a75b130dfed5d2 /Doc/library/optparse.rst
parent4be0f157ea7000ded8d4a3ae818a74b026f1fed3 (diff)
downloadcpython-84e52171b541ecc01f2d738cf82f5d4199a4bce7.zip
cpython-84e52171b541ecc01f2d738cf82f5d4199a4bce7.tar.gz
cpython-84e52171b541ecc01f2d738cf82f5d4199a4bce7.tar.bz2
[3.12] gh-106909: Use role :const: for referencing module constants (GH-106910) (GH-106956)
(cherry picked from commit 4b9948617f91175783609769aa6160e5b49b9ccc)
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 0cff381..846b8e0 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -812,7 +812,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
@@ -1078,7 +1078,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
@@ -1250,7 +1250,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.
@@ -1521,7 +1521,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)