8000 Docs: Fix duplicate object description warnings (#122068) · python/cpython@8db5f48 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8db5f48

Browse files
authored
Docs: Fix duplicate object description warnings (#122068)
1 parent a09e215 commit 8db5f48

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Doc/library/email.compat32-message.rst

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,7 @@ Element Objects
874874

875875
.. module:: xml.etree.ElementTree
876876
:noindex:
877+
:no-index:
877878

878879
.. class:: Element(tag, attrib={}, **extra)
879880

Doc/tools/extensions/pyspecific.py

Lines changed: 5 additions & 1 deletion
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)
0