mirror of https://github.com/astral-sh/ruff
update snapshots
This commit is contained in:
parent
2230ab07d0
commit
f707bf6cf8
|
|
@ -21,12 +21,13 @@ fn lint_select() {
|
|||
specific prefixes. `ignore` takes precedence over `select` if the
|
||||
same prefix appears in both.
|
||||
|
||||
Default value: ["E4", "E7", "E9", "F"]
|
||||
Default value: ["E4", "E7", "E9", "F", "B012", "PYI057"]
|
||||
Type: list[RuleSelector]
|
||||
Example usage:
|
||||
```toml
|
||||
# On top of the defaults (`E4`, E7`, `E9`, and `F`), enable flake8-bugbear (`B`) and flake8-quotes (`Q`).
|
||||
select = ["E4", "E7", "E9", "F", "B", "Q"]
|
||||
# On top of the defaults (`E4`, E7`, `E9`, `F`, `B012`, and `PYI057`),
|
||||
# enable flake8-bugbear (`B`) and flake8-quotes (`Q`).
|
||||
select = ["E4", "E7", "E9", "F", "PYI057", "B", "Q"]
|
||||
```
|
||||
|
||||
----- stderr -----
|
||||
|
|
@ -43,10 +44,10 @@ fn lint_select_json() {
|
|||
----- stdout -----
|
||||
{
|
||||
"doc": "A list of rule codes or prefixes to enable. Prefixes can specify exact\nrules (like `F841`), entire categories (like `F`), or anything in\nbetween.\n\nWhen breaking ties between enabled and disabled rules (via `select` and\n`ignore`, respectively), more specific prefixes override less\nspecific prefixes. `ignore` takes precedence over `select` if the\nsame prefix appears in both.",
|
||||
"default": "[\"E4\", \"E7\", \"E9\", \"F\"]",
|
||||
"default": "[\"E4\", \"E7\", \"E9\", \"F\", \"B012\", \"PYI057\"]",
|
||||
"value_type": "list[RuleSelector]",
|
||||
"scope": null,
|
||||
"example": "# On top of the defaults (`E4`, E7`, `E9`, and `F`), enable flake8-bugbear (`B`) and flake8-quotes (`Q`).\nselect = [\"E4\", \"E7\", \"E9\", \"F\", \"B\", \"Q\"]",
|
||||
"example": "# On top of the defaults (`E4`, E7`, `E9`, `F`, `B012`, and `PYI057`),\n# enable flake8-bugbear (`B`) and flake8-quotes (`Q`).\nselect = [\"E4\", \"E7\", \"E9\", \"F\", \"PYI057\", \"B\", \"Q\"]",
|
||||
"deprecated": null
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ file_resolver.project_root = "<temp_dir>/"
|
|||
linter.exclude = []
|
||||
linter.project_root = "<temp_dir>/"
|
||||
linter.rules.enabled = [
|
||||
jump-statement-in-finally (B012),
|
||||
byte-string-usage (PYI057),
|
||||
multiple-imports-on-one-line (E401),
|
||||
module-import-not-at-top-of-file (E402),
|
||||
multiple-statements-on-one-line-colon (E701),
|
||||
|
|
@ -126,6 +128,8 @@ linter.rules.enabled = [
|
|||
raise-not-implemented (F901),
|
||||
]
|
||||
linter.rules.should_fix = [
|
||||
jump-statement-in-finally (B012),
|
||||
byte-string-usage (PYI057),
|
||||
multiple-imports-on-one-line (E401),
|
||||
module-import-not-at-top-of-file (E402),
|
||||
multiple-statements-on-one-line-colon (E701),
|
||||
|
|
|
|||
Loading…
Reference in New Issue