feat: drop rule groups Ruff 0.16 selects by default - #843
Merged
Conversation
Ruff 0.16 enables 413 rules without configuration. `BLE`, `DTZ`, `FA`, `FLY`, `INT`, `PIE`, and `YTT` are fully covered, and `I` is covered except for `I002`, which needs the `required-imports` setting. Remove these from the cookie and the style guide, remove the `RF102` check, and teach `sp-ruff-checks` to report them as safe to remove instead of suggesting them. Assisted-by: ClaudeCode:claude-opus-5
Collaborator
Author
|
Here's the B and UP rules that are not selected by default still: 🤖 AI text below 🤖 Checked against ruff 0.16.2 (
Stable rules you only get by selecting
Preview-only, so selecting
Stable gains: UP013 (convert-typed-dict-functional-to-class), UP015 (redundant-open-modes), UP042 (replace-str-enum). |
Ruff 0.16 selects 42 of the 48 `UP` rules without configuration. Selecting the group is still useful for the three stable rules it adds (`UP013`, `UP015`, and `UP042`), so keep the suggestion in the style guide and in `sp-ruff-checks`, but stop reporting it as a required setting. Assisted-by: ClaudeCode:claude-opus-5
Alexboiboi
added a commit
to magpylib/magpylib
that referenced
this pull request
Aug 26, 2026
* Update from scientific-python/cookie template `2026.08.14` Ran `copier update` from `2026.04.04`. Notable upstream changes: - blacken-docs is gone; ruff-format now handles markdown, jupyter and pyproject code blocks instead (scientific-python/cookie#833). - The ruff `extend-select` list drops BLE, DTZ, FA, FLY, I, PIE and YTT, which Ruff 0.16 selects by default (scientific-python/cookie#843). - zizmor joins pre-commit, with `.github/zizmor.yml` allowing ref pins. - Workflows gain a top level `permissions: {}` with per-job grants, and `persist-credentials: false` on checkout. - `actions/attest-build-provenance` -> `actions/attest`, which generates SLSA build provenance when handed no predicate inputs. - Dependabot gets a seven day cooldown. Conflicts were resolved in favour of ours wherever the project has deliberately diverged: the Read the Docs `commands:` block stays (it needs libgl1-mesa-dev and sphinx-apidoc, so only the interpreter bump to 3.14 was taken), as do the disabled mypy hook (rev synced to v2.3.0 for whenever it is enabled), the pyvista headless display and pypy OpenBLAS steps, the note explaining the hynek pin, and our test matrix. The checks job also sheds a duplicate `astral-sh/setup-uv` invocation and an `allow-prereleases` input that was being handed to setup-uv, which has no such input. Both arrived in #954. Python now comes from setup-python again, as the template intends. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Reformat docs code blocks with ruff-format Falls out of swapping blacken-docs for ruff-format in the template update: an implicit f-string concatenation collapses onto one line, `{i+1}` gains spaces around the operator, and two blank lines after a `for` go away. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Pin the CI matrix interpreter for uv Now that setup-python provides the interpreter rather than setup-uv, `uv sync` is no longer handed one explicitly and discovers it off PATH. Setting UV_PYTHON keeps the matrix honest: a discovery mismatch would fail open and test the same version twice under two different job names. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
🤖 AI text below 🤖
Ruff 0.16 turns on 413 rules without configuration. Compared the default set against the full rule index:
BLE,DTZ,FA,FLY,INT,PIE, andYTTare fully covered (including preview rules), andIis covered except forI002, which needs thelint.isort.required-importssetting. No other group is fully covered.extend-selectand from both example configs in the style guide.RF102check ("isort must be selected").RF101(B) andRF103(UP) stay, because those groups are not fully default.sp-ruff-checksno longer suggests the default groups under "Unselected". If a config still selects one, it is now listed under "Selected, but on by default (safe to remove)".linter.jsonis unchanged: Ruff 0.16 adds and removes no linter prefixes.📚 Documentation preview 📚: https://scientific-python-cookie--843.org.readthedocs.build/