Do I understand the difference between "--select" and "--extend-select" correct? #10753
-
I was not able to find an appropriate explanation of that difference. The docs them self should be updated. They are not clear about it. When I use "--select" ALL rules are disabled except the ones I list via "select"? So no default rules are active anymore? When I use "--extend-select=" the default rules are still active? Today ruff is to old and established to modify that behavior. But it is unusual and it should be taken into account for the next major release to modify that. "extend-select" should be removed and "select" should behave like "extend-select". The problem and IMHO unusual behavior is that "--select" has the implicit behavior to disable ALL rules. That is unexpected to most users I assume. I was surprised not finding any earlier discussion about that topic. I assume there is one somewhere in the internet. I assume I am not the first one morning about that behavior. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You're understanding is correct and this is documented here Another way to think about it is that:
|
Beta Was this translation helpful? Give feedback.
You're understanding is correct and this is documented here
Another way to think about it is that:
select
: Replaces the rules or sets the rules explicitlyextend-select
: Adds new rules to what's configured byselect
extend-select
is essential to support configuration inheritance when using theextend
option. It is crucial because most users want to add new rules in addition to what the base configuration specifies. However, that's not always the c…