Repository navigation
docs: cross-reference the warning classes in Warns sections (#2094) - #2096
Merged
Merged
Conversation
Owner
Author
|
GOOD TO GO at
|
Contributor
|
Coverage: 91.54% (unit tier, Python 3.15,
Per-file detail: the |
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— bug fixesDescription of your pull request and other information
Closes #2094. In napoleon (Sphinx 9.1.0),
Warns:went through_format_fieldsand came out as:Warns: **Name** -- desc: bold, with no role, and with a~printed literally.Raises:instead becomes:raises Name:, which the Python domain links.docs/source/conf.py'ssetupreplacesGoogleDocstring._parse_warns_section, which the NumPy style inherits. Each name becomes:exc:`.Name`, which gets the same suffix search asRaises. A~prefix still shortens the title, and builtins resolve exactly through intersphinx. Comma lists are split; roles, literals andname (type)are left alone. No docstring changes.docs/requirements.txt, as indeploy-pages.yml), there are 0 warnings before and after. Of the 62 warning names inWarnssections, all are now links where all were plain text before.test_docs_warns_xrefs_2094_unitruns napoleon in both styles with the build's settings. It resolves eachWarnsname and its:raises:counterpart through the Python domain and checks they land on the same target. Withconf.pyreverted tomain, 12 of its 15 tests fail. It needs Sphinx and the pinnedsphinx-autodoc-typehints, and skips without them, like the other docs tests.