Add more ruff rules (B, PTH, RSE, SIM, C4, BLE, A)#4034
Merged
mashehu merged 59 commits intonf-core:devfrom Apr 14, 2026
Merged
Add more ruff rules (B, PTH, RSE, SIM, C4, BLE, A)#4034mashehu merged 59 commits intonf-core:devfrom
mashehu merged 59 commits intonf-core:devfrom
Conversation
8dac8db to
b53e971
Compare
a84464a to
084389c
Compare
Contributor
Author
|
hah, looks like most of these new rules are anyway part of an upcoming set of default ruff rules: astral-sh/ruff#23203 |
b2cd1b3 to
dada220
Compare
fabianegli
reviewed
Mar 9, 2026
fabianegli
reviewed
Mar 9, 2026
Contributor
ningyuxin1999
left a comment
There was a problem hiding this comment.
Will continue with reviewing tomorrow :))
ningyuxin1999
approved these changes
Apr 1, 2026
# Conflicts: # CHANGELOG.md # Conflicts: # CHANGELOG.md # Conflicts: # CHANGELOG.md
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.
Additional rules we could add:
- [ ] "RUF", # Ruff-specific rules - includes RUF103/104 for validating suppressions- [ ] "PIE", # flake8-pie - misc lints for common issues- [ ] "RET", # flake8-return - unnecessary variable assignments before return- [ ] "ARG", # flake8-unused-arguments - finds unused function arguments- [ ] "TRY", # tryceratops - exception handling best practicesUpdate:
Rest of the rules would need too many exceptions etc. to be applicable for our code