forked from astral-sh/ruff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ruff allows rules to be enabled with `select` and disabled with `ignore`, where the more specific rule selector takes precedence, for example: `--select ALL --ignore E501` selects all rules except E501 `--ignore ALL --select E501` selects only E501 (If both selectors have the same specificity ignore selectors take precedence.) Ruff always had two quirks: * If `pyproject.toml` specified `ignore = ["E501"]` then you could previously not override that with `--select E501` on the command-line (since the resolution didn't take into account that the select was specified after the ignore). * If `pyproject.toml` specified `select = ["E501"]` then you could previously not override that with `--ignore E` on the command-line (since the resolution didn't take into account that the ignore was specified after the select). Since d067efe (astral-sh#1245) `extend-select` and `extend-ignore` always override `select` and `ignore` and are applied iteratively in pairs, which introduced another quirk: * If some `pyproject.toml` file specified `extend-select` or `extend-ignore`, `select` and `ignore` became pretty much unreliable after that with no way of resetting that. This commit fixes all of these quirks by making later configuration sources take precedence over earlier configuration sources. While this is a breaking change, it fixes the broken status quo.
- Loading branch information
1 parent
7b071f5
commit 8f048c5
Showing
7 changed files
with
173 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.