Skip to content
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

Missing config option for extend_external #11921

Open
jvacek opened this issue Jun 18, 2024 · 3 comments
Open

Missing config option for extend_external #11921

jvacek opened this issue Jun 18, 2024 · 3 comments
Labels
configuration Related to settings and configuration help wanted Contributions especially welcome

Comments

@jvacek
Copy link

jvacek commented Jun 18, 2024

I have two configs, base.toml that is shared for multiple projects, and my in-project pyproject.toml that extends the one above.

It would be nice if the external could also be extended, much like select and ignore.

@MichaReiser MichaReiser added the configuration Related to settings and configuration label Jun 18, 2024
@MichaReiser
Copy link
Member

I can see how this is useful. I'm personally hesitant to add new extend- settings because we ultimately would need to add a extend variant for any list setting. An alternative solution would be to make external a table.

[ruff.lint.external]
V = "Explanation where the rule comes from"

@jvacek
Copy link
Author

jvacek commented Jun 18, 2024

Going for a table would be quite a deviation from the way the other "rule-selector" options behave in my opinion.

IF the greater issue is that adding extends would be hard to apply across the board, An alternative might be to go for sections like [ruff.extends] and [ruff.lint.extend] etc., which would then just contain select = [] etc. Might be easier to see what is being set/overwritten, and what is being extended.

I'm sure this opens up a whole other can of worms for making sure that all sections can extend and how to deal with non-list values, which might just mean that adding the variant to all list settings might make more sense.

@charliermarsh
Copy link
Member

I'm personally fine with supporting it, but somewhat low priority (PR welcome).

@charliermarsh charliermarsh added the help wanted Contributions especially welcome label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration help wanted Contributions especially welcome
Projects
None yet
Development

No branches or pull requests

3 participants