Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-03-08 18:51:29 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-03-13 18:10:00 +0300
commit6c7480b3f63a726995e9d20e8a3c8c4ebecc1111 (patch)
treebbabf3e116db8bacf500347cce2fcc5a972549db /sphinx/domains
parentae413e95ed6fd2b3a9d579a3d802e38846906b54 (diff)
Fix #7119: autodoc: Broken doctree was generated by builtin_resolver
The builtin_resolver() generates broken doctree unexpectedly if it contains pending_xref_condition nodes.
Diffstat (limited to 'sphinx/domains')
-rw-r--r--sphinx/domains/python.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
index 40a67f82c..1b5e18cdf 100644
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -1301,6 +1301,10 @@ def builtin_resolver(app: Sphinx, env: BuildEnvironment,
return s in typing.__all__ # type: ignore
+ content = find_pending_xref_condition(node, 'resolved')
+ if content:
+ contnode = content.children[0]
+
if node.get('refdomain') != 'py':
return None
elif node.get('reftype') in ('class', 'obj') and node.get('reftarget') == 'None':