mirror of https://github.com/astral-sh/ruff
Mark `FStringMissingPlaceholders` as fixable (#1582)
This commit is contained in:
parent
afb6f55b8d
commit
b351221049
|
|
@ -545,7 +545,7 @@ For more, see [Pyflakes](https://pypi.org/project/pyflakes/2.5.0/) on PyPI.
|
|||
| F523 | StringDotFormatExtraPositionalArguments | '...'.format(...) has unused arguments at position(s): ... | |
|
||||
| F524 | StringDotFormatMissingArguments | '...'.format(...) is missing argument(s) for placeholder(s): ... | |
|
||||
| F525 | StringDotFormatMixingAutomatic | '...'.format(...) mixes automatic and manual numbering | |
|
||||
| F541 | FStringMissingPlaceholders | f-string without any placeholders | |
|
||||
| F541 | FStringMissingPlaceholders | f-string without any placeholders | 🛠 |
|
||||
| F601 | MultiValueRepeatedKeyLiteral | Dictionary key literal repeated | |
|
||||
| F602 | MultiValueRepeatedKeyVariable | Dictionary key `...` repeated | |
|
||||
| F621 | ExpressionsInStarAssignment | Too many expressions in star-unpacking assignment | |
|
||||
|
|
|
|||
|
|
@ -3495,6 +3495,7 @@ impl CheckKind {
|
|||
| CheckKind::DuplicateHandlerException(..)
|
||||
| CheckKind::EndsInPeriod
|
||||
| CheckKind::EndsInPunctuation
|
||||
| CheckKind::FStringMissingPlaceholders
|
||||
| CheckKind::GetAttrWithConstant
|
||||
| CheckKind::ImplicitReturn
|
||||
| CheckKind::ImplicitReturnValue
|
||||
|
|
@ -3622,6 +3623,9 @@ impl CheckKind {
|
|||
CheckKind::EndsInPeriod => Some("Add period".to_string()),
|
||||
CheckKind::EndsInPunctuation => Some("Add closing punctuation".to_string()),
|
||||
CheckKind::ExtraneousScopeFunction => Some("Remove `scope=` argument".to_string()),
|
||||
CheckKind::FStringMissingPlaceholders => {
|
||||
Some("Remove extraneous `f` prefix".to_string())
|
||||
}
|
||||
CheckKind::GetAttrWithConstant => {
|
||||
Some("Replace `getattr` with attribute access".to_string())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue