Enforce ruff rules using pre-commit#484
Open
DimitriPapadopoulos wants to merge 9 commits into
Open
Conversation
DimitriPapadopoulos
force-pushed
the
ruff
branch
from
February 18, 2026 12:56
d9c3461 to
fd9051c
Compare
DimitriPapadopoulos
force-pushed
the
ruff
branch
3 times, most recently
from
February 18, 2026 13:06
2ff848a to
3b46531
Compare
kevina
reviewed
Feb 19, 2026
DimitriPapadopoulos
force-pushed
the
ruff
branch
2 times, most recently
from
February 22, 2026 09:51
add1480 to
a7bd8e5
Compare
DimitriPapadopoulos
marked this pull request as ready for review
February 22, 2026 09:52
Contributor
Author
|
I would suggest using prek as a drop-in replacement for pre-commit. The associated j178/prek-action is fully maintained. |
DimitriPapadopoulos
force-pushed
the
ruff
branch
2 times, most recently
from
March 2, 2026 17:27
f3a50ff to
ca99bb4
Compare
DimitriPapadopoulos
force-pushed
the
ruff
branch
2 times, most recently
from
June 14, 2026 07:33
971f1a8 to
ab591de
Compare
Unnecessary generator (rewrite as a set comprehension)
Unnecessary `map()` usage (rewrite using a generator expression)
Use a dictionary comprehension instead of a for-loop
Consider merging multiple comparisons
Use `sys.exit()` instead of `exit`
Use `elif` instead of `else` then `if`, to reduce indentation
Combine `if` branches using logical `or` operator
DimitriPapadopoulos
force-pushed
the
ruff
branch
from
June 26, 2026 07:24
ab591de to
3e03ae8
Compare
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.
Use the pre-commit GitHub Action although:
The alternative would be to give pre-commit.ci access to the repository.
Requires enabling GitHub Actions for this repository.