mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:10:09 +00:00
Correct UP027 message to “generator expression” (#1540)
This commit is contained in:
parent
31ce37dd8e
commit
86b61806a5
2 changed files with 3 additions and 3 deletions
|
@ -689,7 +689,7 @@ For more, see [pyupgrade](https://pypi.org/project/pyupgrade/3.2.0/) on PyPI.
|
||||||
| UP024 | OSErrorAlias | Replace aliased errors with `OSError` | 🛠 |
|
| UP024 | OSErrorAlias | Replace aliased errors with `OSError` | 🛠 |
|
||||||
| UP025 | RewriteUnicodeLiteral | Remove unicode literals from strings | 🛠 |
|
| UP025 | RewriteUnicodeLiteral | Remove unicode literals from strings | 🛠 |
|
||||||
| UP026 | RewriteMockImport | `mock` is deprecated, use `unittest.mock` | 🛠 |
|
| UP026 | RewriteMockImport | `mock` is deprecated, use `unittest.mock` | 🛠 |
|
||||||
| UP027 | RewriteListComprehension | Replace unpacked list comprehension with a tuple comprehension | 🛠 |
|
| UP027 | RewriteListComprehension | Replace unpacked list comprehension with a generator expression | 🛠 |
|
||||||
|
|
||||||
### pep8-naming (N)
|
### pep8-naming (N)
|
||||||
|
|
||||||
|
|
|
@ -2742,7 +2742,7 @@ impl CheckKind {
|
||||||
"`mock` is deprecated, use `unittest.mock`".to_string()
|
"`mock` is deprecated, use `unittest.mock`".to_string()
|
||||||
}
|
}
|
||||||
CheckKind::RewriteListComprehension => {
|
CheckKind::RewriteListComprehension => {
|
||||||
"Replace unpacked list comprehension with a tuple comprehension".to_string()
|
"Replace unpacked list comprehension with a generator expression".to_string()
|
||||||
}
|
}
|
||||||
// pydocstyle
|
// pydocstyle
|
||||||
CheckKind::FitsOnOneLine => "One-line docstring should fit on one line".to_string(),
|
CheckKind::FitsOnOneLine => "One-line docstring should fit on one line".to_string(),
|
||||||
|
@ -3331,7 +3331,7 @@ impl CheckKind {
|
||||||
MockReference::Attribute => "Replace `mock.mock` with `mock`".to_string(),
|
MockReference::Attribute => "Replace `mock.mock` with `mock`".to_string(),
|
||||||
}),
|
}),
|
||||||
CheckKind::RewriteListComprehension => {
|
CheckKind::RewriteListComprehension => {
|
||||||
Some("Replace with tuple comprehension".to_string())
|
Some("Replace with generator expression".to_string())
|
||||||
}
|
}
|
||||||
CheckKind::NewLineAfterSectionName(name) => {
|
CheckKind::NewLineAfterSectionName(name) => {
|
||||||
Some(format!("Add newline after \"{name}\""))
|
Some(format!("Add newline after \"{name}\""))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue