Closed
Conversation
This was done by running.
sed -i -E 's/:(mod|class|func|data|meth):`/`/g' **/*.py
The current default_role setting for sphinx is `obj`, which means that
backticks-wrapped terms automatically look up documented Python objects.
numpydoc does not like entries in See Also sections to be backquoted without an explicit role, but it is able to handle them without backquotes at all (in fact, that format is given in the numpydoc specification). Fix the corresponding docstrings accordingly, and line-wrap them.
dcceac4 to
f2658f9
Compare
Axes.pick can be removed as it just inherits Artist.pick.
Contributor
Author
|
[Temporarily closing the PR as I would prefer #9173 be merged first to avoid some tricky rebase; will reopen later.] |
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.
PR Summary
See #7502 for the original issue.
We don't actually need to use the
anyrole yet; right now the default is already theobjrole, which resolves to any documented Python object. We can always switch the default toany(as suggested by #7502) at some later point, although I would prefer sphinx-doc/sphinx#3616 be fixed before doing that.Right now, this PR only changes .py files and not .rst files, as in the latter case we probably need to think about what to do with the old whatsnews (if we agree to make the change everywhere it can easily be added).
The PR doesn't re-line wrap the newly formatted docstrings yet as this probably needs to be done manually (and is a lot of work that can be done in subsequent PRs in a piecemeal fashion), but redoing the wrapping would probably further enhance the legibility of the docstrings.
The first commit was simply done by running
The second commit fixes a few markups to make the doc build again, as explained in the commit text:
The last commits contains piecemeal minor markup fixes.
PR Checklist