diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-03-08 18:51:29 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-03-13 18:10:00 +0300 |
commit | 6c7480b3f63a726995e9d20e8a3c8c4ebecc1111 (patch) | |
tree | bbabf3e116db8bacf500347cce2fcc5a972549db /sphinx/domains | |
parent | ae413e95ed6fd2b3a9d579a3d802e38846906b54 (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.py | 4 |
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': |