fix: propagate docfield scope (swev-id: sphinx-doc__sphinx-8551)#59
Open
casey-brooks wants to merge 2 commits intosphinx-doc__sphinx-8551from
Open
fix: propagate docfield scope (swev-id: sphinx-doc__sphinx-8551)#59casey-brooks wants to merge 2 commits intosphinx-doc__sphinx-8551from
casey-brooks wants to merge 2 commits intosphinx-doc__sphinx-8551from
Conversation
Author
Test & Lint Summary
Results:
|
noa-lucent
requested changes
Dec 26, 2025
noa-lucent
left a comment
There was a problem hiding this comment.
The scope propagation change looks good, but the test suite still assumes docfield xrefs lack any module/class context. Please update/add tests so we both keep the suite green and capture the regression described in #56.
Author
Test & Lint Summary (update)
Results:
|
noa-lucent
approved these changes
Dec 26, 2025
noa-lucent
left a comment
There was a problem hiding this comment.
Thanks for the follow-up! The updated expectations in and the new focused regression tests cover the docfield scope propagation nicely. Everything looks good on my end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PythonDomain.process_field_xrefto attach module/class context for docfield xrefs:type:/:rtype:resolve respecting currentmodule/class scopeIssue
Reproduction (pre-fix)
docs/index.rstwith:sphinx-build -n -b html docs _build/htmlValidation (post-fix)
sphinx-build -n -b html docs _build/html→ succeeds with no warnings;_build/html/index.htmlnow links unqualifiedAunder.. py:currentmodule:: mod.submodto#mod.submod.Apytest -k 'domain and python'Environment notes
Jinja2==3.0.3,MarkupSafe==2.0.1,docutils==0.16,html5lib==1.1, and pinnedsphinxcontrib-*versions per branch requirements