Upgrade Ruff configuration for v0.2.0 #11927
Merged
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
Hopefully a welcome PR, but this upgrades Sphinx's Ruff configuration to reflect some of the changes we're making in v0.2.0. We use Sphinx in our ecosystem checks, and I wanted to do an example migration anyway, both for illustrative purposes and for my own testing. (This PR won't pass until we do the actual v0.2.0 release.)
Here's a summary of the relevant changes for Sphinx:
show-source = true
was replaced byoutput-format = "full"
. (This is a deprecation, not a removal, so changing it here merely removes the deprecation warning.)ANN101
andANN102
were deprecated. (Selecting them with preview enabled is now an error; selecting them outside of preview is a warning.)PGH001
was redirected toS307
(I enabledS307
and changed the# NoQA
assertions, which would've continued to work, but with a deprecation warning).RUF011
was redirected toB035
(which you already have enabled, so I just removedRUF011
, which would've warned).TCH006
was redirected toTCH010
to match the upstream plugin.