Rename applicability levels to always, sometimes, and never (#7821)

Following much discussion for #4181 at
https://github.com/astral-sh/ruff/pull/5119,
https://github.com/astral-sh/ruff/discussions/5476, #7769,
https://github.com/astral-sh/ruff/pull/7819, and in
[Discord](1159144114),
this pull request changes `Applicability` from using `Automatic`,
`Suggested`, and `Manual` to `Always`, `Sometimes`, and `Never`.

Also removes `Applicability::Unspecified` (replacing #7792).
This commit is contained in:
Zanie Blue 2023-10-05 13:43:46 -05:00 committed by GitHub
parent 7dc9887ab9
commit b64f403dc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
187 changed files with 386 additions and 381 deletions

View file

@ -178,10 +178,9 @@ def fibonacci(n):
},
TextRange::new(TextSize::from(7), TextSize::from(9)),
)
.with_fix(Fix::suggested(Edit::range_deletion(TextRange::new(
TextSize::from(0),
TextSize::from(10),
))));
.with_fix(Fix::sometimes_applies(Edit::range_deletion(
TextRange::new(TextSize::from(0), TextSize::from(10)),
)));
let fib_source = SourceFileBuilder::new("fib.py", fib).finish();
@ -193,7 +192,7 @@ def fibonacci(n):
},
TextRange::new(TextSize::from(94), TextSize::from(95)),
)
.with_fix(Fix::suggested(Edit::deletion(
.with_fix(Fix::sometimes_applies(Edit::deletion(
TextSize::from(94),
TextSize::from(99),
)));