-
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
--extend-select
and --extend-ignore
work in unexpected ways
#2300
Comments
Yes it's intentional. |
Here are some resources on the reasoning behind it: |
Closing as this is correct from my perspective but happy to keep discussing. |
If it's intentional I think the options should rather be called |
I'm open to it. Though I'd like it to be done in a backwards-compatible way, and I'd prefer not to support all of |
Although, |
To be honest I don't find your reasoning in #1245 convincing. If I understand correctly you say that it's unintuitive that That is I'd argue even |
There are a lot of cases to consider. The primary motivation for this change wasn't the CLI. It was that, if you don't use these semantics for Specifically, prior to that change, if you had a [tool.ruff]
select = ["F"]
ignore = ["F401"] And then a child that extended it: [tool.ruff]
extend = "../pyproject.toml"
extend-select = ["F401"]
This change allowed us to treat the resolution in two passes: resolve the (select, ignore) rules, then apply the (extend-select, extend-ignore) rules. Happy to consider a proposal that takes all of these cases into account. What you describe sounds like replacing |
What does "take precedence" here mean precisely? Could you provide examples of the expected behavior? In a sense, it does take precedence right now, since it overrides the Is the suggestion that if a user provides either |
To be clear: I'd love to make this stuff more intuitive. I won't personally be working on it right now, but I'm very open to suggestions. I just want to make sure we're thinking through all the implications and that I'm clearly explaining why certain things work the way they do right now. |
Right I agree that this is a problem however I think the obvious cause is that |
Like, keep every foursome intact, then when resolving, resolve the first foursome, then pass those rules along and "apply" the next foursome, etc.? |
Yes. This would also mean that latter |
Would we have any need for |
I feel like you need a PhD in |
I would expect
--extend-select
and--extend-ignore
to simply append the values to the--select
and--ignore
values however they in fact take precedence over the former.I find the current behavior to be unintuitive, is it intentional?
The text was updated successfully, but these errors were encountered: