rst markup simplification #9166
Closed
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
any
role yet; right now the default is already theobj
role, 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