Replace black, isort, and tox with ruff#453
Open
sandhose wants to merge 3 commits intoquenting/modern-tooling/uvfrom
Open
Replace black, isort, and tox with ruff#453sandhose wants to merge 3 commits intoquenting/modern-tooling/uvfrom
sandhose wants to merge 3 commits intoquenting/modern-tooling/uvfrom
Conversation
2 tasks
5d9cf7f to
9164fd6
Compare
a7c093c to
1bb8aa4
Compare
9164fd6 to
9168f4e
Compare
5f86b8d to
6a1be12
Compare
0983991 to
a04555f
Compare
65d3fa2 to
cb6f287
Compare
d73e118 to
6e4032f
Compare
cb6f287 to
78aadaa
Compare
6e4032f to
a4b18b8
Compare
f96764e to
e1c6876
Compare
13a55b4 to
7d9a084
Compare
8713ae8 to
06655a7
Compare
5c5a561 to
99dc5cd
Compare
9037622 to
8da7963
Compare
99dc5cd to
2aa588c
Compare
8da7963 to
ea0f3c9
Compare
b63d6d9 to
a094f02
Compare
ea0f3c9 to
9d22a3d
Compare
a094f02 to
a0ed884
Compare
1b905ff to
4a2c52e
Compare
a0ed884 to
2ca957a
Compare
4a2c52e to
5b6b2c5
Compare
9823327 to
ea1433a
Compare
5b6b2c5 to
2e5242f
Compare
ea1433a to
585d548
Compare
2e5242f to
59748b5
Compare
Remove black, isort, and tox from dev dependencies. Upgrade ruff from 0.0.291 to >=0.11 and configure it as both linter and formatter with isort integration. Update CI pipeline to call ruff/mypy directly instead of through tox. Update lint.sh accordingly.
59748b5 to
184a6e9
Compare
reivilibre
approved these changes
Apr 7, 2026
| - uses: actions/checkout@v6 | ||
| - uses: astral-sh/setup-uv@v5 | ||
| - run: uv run tox -e check_types | ||
| - run: uv run mypy sygnal/ tests/ stubs |
Contributor
There was a problem hiding this comment.
should we add the mypy config such that just running uv run mypy will check everything? This is also handy for manual use, so seems good to centralise
If ruff has an equivalent, that would also be good
| ] | ||
| ignore = [ | ||
| "E501", # https://beta.ruff.rs/docs/rules/line-too-long/. Black enforces this for us. | ||
| "E501", # line too long (handled by formatter) |
Contributor
There was a problem hiding this comment.
this comment now feels a bit weird, since ruff is both the linter and the formatter. Does this ignore rule even make sense now that's the case? It'd be strange if ruff conflicted with itself, right?
| "coverage~=5.5", | ||
| "ruff==0.0.291", | ||
| "isort~=5.10", | ||
| "ruff>=0.11", |
Contributor
There was a problem hiding this comment.
the other deps are == pinned
I guess this might still be fine because we have a lockfile now, but in that case wondering what the right convention is
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.
Summary
black(formatter) andisort(import sorter) withruff formatandruff check --select Itox.ini— CI now calls ruff and mypy directly viauv runscripts-dev/lint.shfor ruffknown-local-folderfortestsso they sort after first-party (sygnal) in their own section, matching the old isort customTESTSsectionNotes
ruff>=0.11is intentionally loosely pinned (open lower bound).pytest-covin PR Modernize tooling and dependencies #456.Test plan
uv run ruff check sygnal/ tests/ stubspassesuv run ruff format --check sygnal/ tests/ stubspasses