Skip to content

Commit

Permalink
Merge pull request #8996 from tk0miya/7119_pending_xref_conditions
Browse files Browse the repository at this point in the history
Fix #7119: autodoc: Broken doctree was generated by builtin_resolver
  • Loading branch information
tk0miya authored Mar 14, 2021
2 parents c89bda1 + 5b5730e commit 4915ea6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sphinx/domains/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,10 @@ def istyping(s: str) -> bool:

return s in typing.__all__ # type: ignore

content = find_pending_xref_condition(node, 'resolved')
if content:
contnode = content.children[0] # type: ignore

if node.get('refdomain') != 'py':
return None
elif node.get('reftype') in ('class', 'obj') and node.get('reftarget') == 'None':
Expand Down

0 comments on commit 4915ea6

Please sign in to comment.