ruff
ruff copied to clipboard
"ALL" should ignore deprecated rules
It would be nice, if --select=ALL would ignore already deprecated rules.
I think, situations, where you select "ALL", but do not want to ignore already deprecated rules are rare (but this is just a gut feeling).
see also #9778
I don't think we can have deprecation be a breaking change i.e. a rule turns off when it was previously on. It's an interesting idea though.
I think it would make a lot of sense to deselect these in preview mode (if we don't already? I think we do?).
It is turned off in preview mode. But I guess, that "ALL" can break already by enabling new rules, so breaking is expected, if using "ALL"
From https://docs.astral.sh/ruff/linter/#rule-selection:
Use ALL with discretion. Enabling ALL will implicitly enable new rules whenever you upgrade.
Hm that's fair... I do prefer this to #9778 so okay let's do it :)
I'm going to assign myself but if anyone is interested in grabbing this feel free and I'll just be the reviewer.
@zanieb Hi! Can I take it?
@WindowGenerator go for it!
Wow, thanks. This is just my second issue here and I have to say, that you are as fast as ruff...
Could it also make sense, to add a configuration option in the pyproject.toml that automatically ignores all deprecated rules? Or is this already possible.
@marc-benz That was discussed a bit in https://github.com/astral-sh/ruff/issues/9778 I guess? I'm pretty hesitant to add that though. They'd also be ignored by switchingpreview on in your config.