mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] Docs: Fix duplicate object description warnings (GH-122068) (#122070)
Docs: Fix duplicate object description warnings (GH-122068)
(cherry picked from commit 8db5f48007
)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
parent
a9daa4fd04
commit
0298da432d
3 changed files with 7 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
:synopsis: The base class representing email messages in a fashion
|
:synopsis: The base class representing email messages in a fashion
|
||||||
backward compatible with Python 3.2
|
backward compatible with Python 3.2
|
||||||
:noindex:
|
:noindex:
|
||||||
|
:no-index:
|
||||||
|
|
||||||
|
|
||||||
The :class:`Message` class is very similar to the
|
The :class:`Message` class is very similar to the
|
||||||
|
|
|
@ -869,6 +869,7 @@ Element Objects
|
||||||
|
|
||||||
.. module:: xml.etree.ElementTree
|
.. module:: xml.etree.ElementTree
|
||||||
:noindex:
|
:noindex:
|
||||||
|
:no-index:
|
||||||
|
|
||||||
.. class:: Element(tag, attrib={}, **extra)
|
.. class:: Element(tag, attrib={}, **extra)
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,12 @@ from pprint import pformat
|
||||||
import sphinx
|
import sphinx
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
from docutils.io import StringOutput
|
from docutils.io import StringOutput
|
||||||
|
from docutils.parsers.rst import directives
|
||||||
from docutils.utils import new_document, unescape
|
from docutils.utils import new_document, unescape
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.builders import Builder
|
from sphinx.builders import Builder
|
||||||
from sphinx.domains.changeset import VersionChange, versionlabels, versionlabel_classes
|
from sphinx.domains.changeset import VersionChange, versionlabels, versionlabel_classes
|
||||||
from sphinx.domains.python import PyFunction, PyMethod
|
from sphinx.domains.python import PyFunction, PyMethod, PyModule
|
||||||
from sphinx.errors import NoUri
|
from sphinx.errors import NoUri
|
||||||
from sphinx.locale import _ as sphinx_gettext
|
from sphinx.locale import _ as sphinx_gettext
|
||||||
from sphinx.util import logging
|
from sphinx.util import logging
|
||||||
|
@ -49,6 +50,9 @@ from sphinx.domains import std
|
||||||
|
|
||||||
std.token_re = re.compile(r'`((~?[\w-]*:)?\w+)`')
|
std.token_re = re.compile(r'`((~?[\w-]*:)?\w+)`')
|
||||||
|
|
||||||
|
# backport :no-index:
|
||||||
|
PyModule.option_spec['no-index'] = directives.flag
|
||||||
|
|
||||||
|
|
||||||
# Support for marking up and linking to bugs.python.org issues
|
# Support for marking up and linking to bugs.python.org issues
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue