Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9ea90b5

Browse filesBrowse files
committed
DOC: Fix missing cross-reference checks for sphinx-tags
In cda4372, I "simplified" from `node['refdomain']` to the existing `domain` argument. With `sphinx-tags`, the `warn-missing-reference` event occurs for a `None` domain, and we crash trying to access `domain.name`. But `node['refdomain']` is still an empty string, so revert back to that.
1 parent 42b88d0 commit 9ea90b5
Copy full SHA for 9ea90b5

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎doc/sphinxext/missing_references.py

Copy file name to clipboardExpand all lines: doc/sphinxext/missing_references.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ def handle_missing_reference(app, domain, node):
100100
#. record missing references for saving/comparing with ignored list.
101101
#. prevent Sphinx from raising a warning on ignored references.
102102
"""
103-
typ = node["reftype"]
103+
refdomain = node["refdomain"]
104+
reftype = node["reftype"]
104105
target = node["reftarget"]
105106
location = get_location(node, app)
106-
domain_type = f"{domain.name}:{typ}"
107+
domain_type = f"{refdomain}:{reftype}"
107108

108109
app.env.missing_references_events[(domain_type, target)].add(location)
109110

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.