Docs: Avoid mention deprecated `extend-ignore` settings (#8305)

## Summary

Closes #8243

I'm not sure about #8222. formatter conflicts warning should include
deprecations happened before warning implementation?
This commit is contained in:
T-256 2023-10-29 02:20:33 +03:30 committed by GitHub
parent 10a50bf1e2
commit c39ea6ef05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -20,9 +20,8 @@ For the full list of supported options, run `ruff check --help`.
## Rule selection ## Rule selection
The set of enabled rules is controlled via the [`select`](settings.md#select) and [`ignore`](settings.md#ignore) The set of enabled rules is controlled via the [`select`](settings.md#select),
settings, along with the [`extend-select`](settings.md#extend-select) and [`extend-ignore`](settings.md#extend-ignore) [`extend-select`](settings.md#extend-select), and [`ignore`](settings.md#ignore) settings.
modifiers.
Ruff's linter mirrors Flake8's rule code system, in which each rule code consists of a one-to-three Ruff's linter mirrors Flake8's rule code system, in which each rule code consists of a one-to-three
letter prefix, followed by three digits (e.g., `F401`). The prefix indicates that "source" of the rule letter prefix, followed by three digits (e.g., `F401`). The prefix indicates that "source" of the rule
@ -47,8 +46,7 @@ formats. Ruff will automatically disable any conflicting rules when `ALL` is ena
If you're wondering how to configure Ruff, here are some **recommended guidelines**: If you're wondering how to configure Ruff, here are some **recommended guidelines**:
- Prefer `select` and `ignore` over `extend-select` and `extend-ignore`, to make your rule set - Prefer `select` over `extend-select` to make your rule set explicit.
explicit.
- Use `ALL` with discretion. Enabling `ALL` will implicitly enable new rules whenever you upgrade. - Use `ALL` with discretion. Enabling `ALL` will implicitly enable new rules whenever you upgrade.
- Start with a small set of rules (`select = ["E", "F"]`) and add a category at-a-time. For example, - Start with a small set of rules (`select = ["E", "F"]`) and add a category at-a-time. For example,
you might consider expanding to `select = ["E", "F", "B"]` to enable the popular flake8-bugbear you might consider expanding to `select = ["E", "F", "B"]` to enable the popular flake8-bugbear
@ -80,7 +78,7 @@ of sources, including the current `pyproject.toml`, any inherited `pyproject.tom
CLI (e.g., `--select`). CLI (e.g., `--select`).
In those scenarios, Ruff uses the "highest-priority" `select` as the basis for the rule set, and In those scenarios, Ruff uses the "highest-priority" `select` as the basis for the rule set, and
then applies any `extend-select`, `ignore`, and `extend-ignore` adjustments. CLI options are given then applies `extend-select` and `ignore` adjustments. CLI options are given
higher priority than `pyproject.toml` options, and the current `pyproject.toml` file is given higher higher priority than `pyproject.toml` options, and the current `pyproject.toml` file is given higher
priority than any inherited `pyproject.toml` files. priority than any inherited `pyproject.toml` files.
@ -197,8 +195,7 @@ Ruff supports several mechanisms for suppressing lint errors, be they false posi
permissible violations. permissible violations.
To omit a lint rule entirely, add it to the "ignore" list via the [`ignore`](settings.md#ignore) To omit a lint rule entirely, add it to the "ignore" list via the [`ignore`](settings.md#ignore)
or [`extend-ignore`](settings.md#extend-ignore) settings, either on the command-line setting, either on the command-line or in your `pyproject.toml` or `ruff.toml` file.
or in your `pyproject.toml` or `ruff.toml` file.
To suppress a violation inline, Ruff uses a `noqa` system similar to [Flake8](https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html). To suppress a violation inline, Ruff uses a `noqa` system similar to [Flake8](https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html).
To ignore an individual violation, add `# noqa: {code}` to the end of the line, like so: To ignore an individual violation, add `# noqa: {code}` to the end of the line, like so: