mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
Remove "blanket" from RUF100 README message (#2844)
This commit is contained in:
parent
32520ff07f
commit
d1cf0ee52b
3 changed files with 3 additions and 3 deletions
|
@ -1477,7 +1477,7 @@ For more, see [flake8-self](https://pypi.org/project/flake8-self/) on PyPI.
|
|||
| RUF003 | ambiguous-unicode-character-comment | Comment contains ambiguous unicode character '{confusable}' (did you mean '{representant}'?) | 🛠 |
|
||||
| RUF004 | keyword-argument-before-star-argument | Keyword argument `{name}` must come after starred arguments | |
|
||||
| RUF005 | unpack-instead-of-concatenating-to-collection-literal | Consider `{expr}` instead of concatenation | 🛠 |
|
||||
| RUF100 | unused-noqa | Unused blanket `noqa` directive | 🛠 |
|
||||
| RUF100 | unused-noqa | Unused `noqa` directive | 🛠 |
|
||||
|
||||
<!-- End auto-generated sections. -->
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ impl AlwaysAutofixableViolation for UnusedNOQA {
|
|||
fn message(&self) -> String {
|
||||
let UnusedNOQA { codes } = self;
|
||||
match codes {
|
||||
None => format!("Unused blanket `noqa` directive"),
|
||||
Some(codes) => {
|
||||
let mut codes_by_reason = vec![];
|
||||
if !codes.unmatched.is_empty() {
|
||||
|
@ -60,6 +59,7 @@ impl AlwaysAutofixableViolation for UnusedNOQA {
|
|||
format!("Unused `noqa` directive ({})", codes_by_reason.join("; "))
|
||||
}
|
||||
}
|
||||
None => format!("Unused blanket `noqa` directive"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,4 +21,4 @@ Use instead:
|
|||
```python
|
||||
if x = 1 or x = 2:
|
||||
print("Hello")
|
||||
```
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue