From 9ea90b5abc6819f59accab2ba7ab614960b1d57b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 13 Sep 2024 22:22:54 -0400 Subject: [PATCH 1/2] DOC: Fix missing cross-reference checks for sphinx-tags In cda437289b0cf41a01571904b6a13bedf8f037a4, 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. --- doc/sphinxext/missing_references.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/sphinxext/missing_references.py b/doc/sphinxext/missing_references.py index 9c3b8256cd91..87432bc524b4 100644 --- a/doc/sphinxext/missing_references.py +++ b/doc/sphinxext/missing_references.py @@ -100,10 +100,11 @@ def handle_missing_reference(app, domain, node): #. record missing references for saving/comparing with ignored list. #. prevent Sphinx from raising a warning on ignored references. """ - typ = node["reftype"] + refdomain = node["refdomain"] + reftype = node["reftype"] target = node["reftarget"] location = get_location(node, app) - domain_type = f"{domain.name}:{typ}" + domain_type = f"{refdomain}:{reftype}" app.env.missing_references_events[(domain_type, target)].add(location) From f43b7467d4c4f0ac95e6cad88232870fc32adc7c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 13 Sep 2024 22:49:22 -0400 Subject: [PATCH 2/2] CI: Add Sphinx extensions as setting `Documentation: build` label --- .github/labeler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 43a1246ba68a..75adfed57f43 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -89,6 +89,7 @@ - 'doc/conf.py' - 'doc/Makefile' - 'doc/make.bat' + - 'doc/sphinxext/**' "Documentation: devdocs": - changed-files: - any-glob-to-any-file: