Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0298da4

Browse files
[3.12] Docs: Fix duplicate object description warnings (GH-122068) (#122070)
Docs: Fix duplicate object description warnings (GH-122068) (cherry picked from commit 8db5f48) Co-authored-by: Adam Turner <[email protected]>
1 parent a9daa4f commit 0298da4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Doc/library/email.compat32-message.rst

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
:synopsis: The base class representing email messages in a fashion
88
backward compatible with Python 3.2
99
:noindex:
10+
:no-index:
1011

1112

1213
The :class:`Message` class is very similar to the

Doc/library/xml.etree.elementtree.rst

+1
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,7 @@ Element Objects
869869

870870
.. module:: xml.etree.ElementTree
871871
:noindex:
872+
:no-index:
872873

873874
.. class:: Element(tag, attrib={}, **extra)
874875

Doc/tools/extensions/pyspecific.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
import sphinx
1919
from docutils import nodes
2020
from docutils.io import StringOutput
21+
from docutils.parsers.rst import directives
2122
from docutils.utils import new_document, unescape
2223
from sphinx import addnodes
2324
from sphinx.builders import Builder
2425
from sphinx.domains.changeset import VersionChange, versionlabels, versionlabel_classes
25-
from sphinx.domains.python import PyFunction, PyMethod
26+
from sphinx.domains.python import PyFunction, PyMethod, PyModule
2627
from sphinx.errors import NoUri
2728
from sphinx.locale import _ as sphinx_gettext
2829
from sphinx.util import logging
@@ -49,6 +50,9 @@
4950

5051
std.token_re = re.compile(r'`((~?[\w-]*:)?\w+)`')
5152

53+
# backport :no-index:
54+
PyModule.option_spec['no-index'] = directives.flag
55+
5256

5357
# Support for marking up and linking to bugs.python.org issues
5458

0 commit comments

Comments
 (0)