Open jvacek opened 4 months ago
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"
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.
I'm personally fine with supporting it, but somewhat low priority (PR welcome).
I have two configs,
base.toml
that is shared for multiple projects, and my in-projectpyproject.toml
that extends the one above.It would be nice if the
external
could also be extended, much likeselect
andignore
.