Enforce ruff rules using pre-commit#484
Open
DimitriPapadopoulos wants to merge 9 commits into
Open
Conversation
d9c3461 to
fd9051c
Compare
2ff848a to
3b46531
Compare
kevina
reviewed
Feb 19, 2026
add1480 to
a7bd8e5
Compare
Contributor
Author
|
I would suggest using prek as a drop-in replacement for pre-commit. The associated j178/prek-action is fully maintained. |
f3a50ff to
ca99bb4
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
ca99bb4 to
2ba8b9d
Compare
Combine `if` branches using logical `or` operator
971f1a8 to
ab591de
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.