summaryrefslogtreecommitdiff
path: root/sphinx/domains/python.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-27 16:02:52 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-27 16:02:52 +0100
commit51927bb6e416aea4f30b39de28e40b53168b7fed (patch)
tree56b97c9072d48681cc9ac2a9f825898910101bd1 /sphinx/domains/python.py
parentf01d50d695bf55f1af34b87c4e6c84f76dd9a36d (diff)
parent7d67371f38210ed328e6249e73ec1e5e607dacd1 (diff)
downloadsphinx-git-51927bb6e416aea4f30b39de28e40b53168b7fed.tar.gz
Merge branch '5.x'
Diffstat (limited to 'sphinx/domains/python.py')
-rw-r--r--sphinx/domains/python.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
index 6a6c447b5..8bf3ceff6 100644
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -1007,7 +1007,7 @@ class PyModule(SphinxDirective):
content_node.document = self.state.document
nested_parse_with_titles(self.state, self.content, content_node)
- ret: List[Node] = [*content_node.children]
+ ret: List[Node] = []
if not noindex:
# note module to the domain
node_id = make_id(self.env, self.state.document, 'module', modname)
@@ -1028,6 +1028,7 @@ class PyModule(SphinxDirective):
indextext = '%s; %s' % (pairindextypes['module'], modname)
inode = addnodes.index(entries=[('pair', indextext, node_id, '', None)])
ret.append(inode)
+ ret.extend(content_node.children)
return ret
def make_old_id(self, name: str) -> str: