You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
hauntsaninja
changed the title
explicit-preview-rules does not work for rules explicitly selected on command line
explicit-preview-rules does not work for fixes
Dec 26, 2023
Thanks for the report! My assumption is that the fixable setting which defaults to ALL is not including the preview rule since it is not explicit. We should probably exempt fixable from these semantics.
## Summary
Right now, if you run with `explicit-preview-rules`, and use something
like `select = ["RUF017"]`, we won't actually enable fixing for that
rule, because `fixable = ["ALL"]` (the default) won't include `RUF017`
due to the `explicit-preview-rules`.
The framing in this PR is that `explicit-preview-rules` should only
affect the enablement selectors, whereas the fixable selectors should
just include all possible matching rules. I think this will lead to the
most intuitive behavior.
Closes#9282. (An alternative to
#9284.)
I'd expect both runs of ruff below to fix the error
The text was updated successfully, but these errors were encountered: