-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Ruff 0.5] Stabilise 11 FURB
rules
#12043
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
FURB167 | 15 | 15 | 0 | 0 | 0 |
FURB105 | 12 | 12 | 0 | 0 | 0 |
PERF403 | 6 | 6 | 0 | 0 | 0 |
FURB129 | 6 | 6 | 0 | 0 | 0 |
FURB187 | 1 | 1 | 0 | 0 | 0 |
FURB136 | 1 | 1 | 0 | 0 | 0 |
FURB177 | 1 | 1 | 0 | 0 | 0 |
Linter (preview)
✅ ecosystem check detected no linter changes.
Having seen the ecosystem report, I'll remove |
FURB
rulesFURB
rules
Now that I've made that change, the updated ecosystem hits all LGTM. I think in each instance, following the recommendation would be a reasonably uncontroversial style/readability improvement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rules are quite complex so I anticipate some issues. But we're clearly not getting more issues by keeping them in preview at this point, so seems fine.
Summary
Stabilise the following rules for release 0.5:
print-empty-string
(FURB105
)readlines-in-for
(FURB129
)if-expr-min-max
(FURB136
)math-constant
(FURB152
)bit-count
(FURB161
)redundant-log-base
(FURB163
)regex-flag-alias
(FURB167
)isinstance-type-none
(FURB168
)type-none-comparison
(FURB169
)implicit-cwd
(FURB177
)hashlib-digest-hex
(FURB181
)list-reverse-copy
(FURB187
)These rules have all been in
preview
for over 90 days and several minor releases. There are no open issues about any of them, and there have not been any open issues about any of them for many months. For each rule, the documentation gives an accurate description of what the rule does and the implementation seems sound.These are all stylistic rules, but I think their recommendations are all fairly uncontroverisal. Several other Refurb rules have been kept in preview for this release, as there are either outstanding issues with the implementation or their recommendations are (in my opinion) highly opinionated/controversial.
Test Plan
cargo test -p ruff_linter