Skip to content

Commit 9080e9e

Browse files
authored
gh-101100: Fix Sphinx warnings in library/pydoc.rst (#116913)
1 parent 1ab0d0b commit 9080e9e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Doc/library/pydoc.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616

1717
--------------
1818

19-
The :mod:`pydoc` module automatically generates documentation from Python
19+
The :mod:`!pydoc` module automatically generates documentation from Python
2020
modules. The documentation can be presented as pages of text on the console,
2121
served to a web browser, or saved to HTML files.
2222

2323
For modules, classes, functions and methods, the displayed documentation is
24-
derived from the docstring (i.e. the :attr:`__doc__` attribute) of the object,
24+
derived from the docstring (i.e. the :attr:`!__doc__` attribute) of the object,
2525
and recursively of its documentable members. If there is no docstring,
26-
:mod:`pydoc` tries to obtain a description from the block of comment lines just
26+
:mod:`!pydoc` tries to obtain a description from the block of comment lines just
2727
above the definition of the class, function or method in the source file, or at
2828
the top of the module (see :func:`inspect.getcomments`).
2929

3030
The built-in function :func:`help` invokes the online help system in the
31-
interactive interpreter, which uses :mod:`pydoc` to generate its documentation
31+
interactive interpreter, which uses :mod:`!pydoc` to generate its documentation
3232
as text on the console. The same text documentation can also be viewed from
3333
outside the Python interpreter by running :program:`pydoc` as a script at the
3434
operating system's command prompt. For example, running ::
@@ -46,7 +46,7 @@ produced for that file.
4646

4747
.. note::
4848

49-
In order to find objects and their documentation, :mod:`pydoc` imports the
49+
In order to find objects and their documentation, :mod:`!pydoc` imports the
5050
module(s) to be documented. Therefore, any code on module level will be
5151
executed on that occasion. Use an ``if __name__ == '__main__':`` guard to
5252
only execute code when a file is invoked as a script and not just imported.
@@ -90,7 +90,7 @@ Python interpreter and typed ``import spam``.
9090
Module docs for core modules are assumed to reside in
9191
``https://docs.python.org/X.Y/library/`` where ``X`` and ``Y`` are the
9292
major and minor version numbers of the Python interpreter. This can
93-
be overridden by setting the :envvar:`PYTHONDOCS` environment variable
93+
be overridden by setting the :envvar:`!PYTHONDOCS` environment variable
9494
to a different URL or to a local directory containing the Library
9595
Reference Manual pages.
9696

@@ -101,7 +101,7 @@ Reference Manual pages.
101101
The ``-g`` command line option was removed.
102102

103103
.. versionchanged:: 3.4
104-
:mod:`pydoc` now uses :func:`inspect.signature` rather than
104+
:mod:`!pydoc` now uses :func:`inspect.signature` rather than
105105
:func:`inspect.getfullargspec` to extract signature information from
106106
callables.
107107

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Doc/library/pickletools.rst
4444
Doc/library/platform.rst
4545
Doc/library/plistlib.rst
4646
Doc/library/profile.rst
47-
Doc/library/pydoc.rst
4847
Doc/library/pyexpat.rst
4948
Doc/library/readline.rst
5049
Doc/library/resource.rst

0 commit comments

Comments
 (0)