Repository navigation
⬆️ Toolchain: ruff 0.17.4, mypy 2.4.1, explicit ruff base rules - #312
Merged
Merged
Conversation
ruff 0.16 grew its default rule set from 59 rules to about 400, so leaving `select` unset changes what is linted on every ruff upgrade. `select = ["E4", "E7", "E9", "F"]` is the old default, so at the current ruff 0.15.21 this changes nothing (the enabled rule set is identical); the existing extend-select / extend-ignore lists are kept as they are.
ruff 0.17 flags an implicit concatenation inside a collection literal (ISC004), since a missing comma there silently joins two items. Wrap the 17 multi-line CSS rules in tools/generate_css.py in parentheses so each one reads as a single item. The generated sphinx-design.min.css is byte-identical.
Bump both in .pre-commit-config.yaml and in the [dependency-groups] pins that the tox ruff/mypy environments use, so the two stay in step. - With the base rule set pinned, ruff 0.17.4 reports one new finding: PLR0917 on the badge role's `__call__`, whose positional signature is the docutils role interface, so it is silenced next to PLR0913. - The ruff-format hook now also formats Python code blocks in Markdown; this reformats one block in CHANGELOG.md and one in docs/css_variables.md. - mypy 2.4.1 reports nothing new.
Taken from the Dependabot python-deps update (#305), without its ruff/mypy pins, which the previous commit sets to match the pre-commit revs. - flit_core <5: the sdist and wheel built with flit_core 4.2.0 hold the same files as with 3.12.0, and the package files are byte-identical; only the metadata changes (Metadata-Version 2.5, adding `Import-Name: sphinx_design`), and `twine check --strict` passes. - pydata-sphinx-theme <0.22: the docs build with 0.21.0 under `-nW`.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #312 +/- ##
=======================================
Coverage 92.63% 92.63%
=======================================
Files 13 13
Lines 1371 1371
=======================================
Hits 1270 1270
Misses 101 101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
chrisjsewell
added a commit
to dipinknair/sphinx-design
that referenced
this pull request
Nov 9, 2026
This was referenced Nov 10, 2026
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.
Brings the linters up to date in one place, replacing the two bot PRs that bumped them to different versions.
.pre-commit-config.yamland in the[dependency-groups]pins the toxruff-*/mypyenvironments use, so the two match.select = ["E4", "E7", "E9", "F"]under[tool.ruff.lint], with the existingextend-select/extend-ignoreunchanged.ruff 0.16 grew its default set from 59 rules to about 400, so an unset
selectchanges what is linted on every upgrade.At ruff 0.15.21 the pin is a no-op (identical enabled rule set).
Under 0.17.4 it takes the findings from 34 to 18, and this PR fixes those 18:
17 × ISC004 in
tools/generate_css.py(multi-line CSS rules wrapped in parentheses; the generatedsphinx-design.min.cssis byte-identical)and 1 × PLR0917 on the badge role's
__call__, whose positional signature is the docutils role interface (silenced next to PLR0913).CHANGELOG.md(the 0.6.0sd_custom_directivesexample) and one indocs/css_variables.mdare re-indented/re-quoted. These are the same two edits [pre-commit.ci] pre-commit autoupdate #296 made.flit_core >=3.4,<5(sdist and wheel built with flit_core 4.2.0 hold the same files as with 3.12.0, and the package files are byte-identical; the metadata becomes Metadata-Version 2.5 withImport-Name: sphinx_design, andtwine check --strictpasses)and
pydata-sphinx-theme>=0.20,<0.22(docs build-nWwith 0.21.0).Supersedes #296 and #305.