]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: Fix duplicate object description warnings (#122068)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Sat, 20 Jul 2024 19:46:41 +0000 (20:46 +0100)
committerGitHub <noreply@github.com>
Sat, 20 Jul 2024 19:46:41 +0000 (19:46 +0000)
Doc/library/email.compat32-message.rst
Doc/library/xml.etree.elementtree.rst
Doc/tools/extensions/pyspecific.py

index c4c322a82e1f44d49e25eb3c097db991a66c5532..6e27a6e224a733b7e06291e64e48d2c183858101 100644 (file)
@@ -7,6 +7,7 @@
    :synopsis: The base class representing email messages in a fashion
               backward compatible with Python 3.2
    :noindex:
+   :no-index:
 
 
 The :class:`Message` class is very similar to the
index 4c1e7bd7e6734a33e004f4271007d5904d7b5c0b..51bf88313e5b7a68597fd47f592a6ea8fc4eebf2 100644 (file)
@@ -874,6 +874,7 @@ Element Objects
 
 .. module:: xml.etree.ElementTree
    :noindex:
+   :no-index:
 
 .. class:: Element(tag, attrib={}, **extra)
 
index a7588bc622e99a0cc87c4ef99c8a41888ecd6bca..f5be19a8d49cc9abda6c31ffb74d268a0f5e50ba 100644 (file)
@@ -18,11 +18,12 @@ from pprint import pformat
 import sphinx
 from docutils import nodes
 from docutils.io import StringOutput
+from docutils.parsers.rst import directives
 from docutils.utils import new_document, unescape
 from sphinx import addnodes
 from sphinx.builders import Builder
 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.locale import _ as sphinx_gettext
 from sphinx.util import logging
@@ -49,6 +50,9 @@ from sphinx.domains import std
 
 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