diff --git a/README.md b/README.md index c027b2ece0..f60ae97127 100644 --- a/README.md +++ b/README.md @@ -409,7 +409,7 @@ The 🛠 emoji indicates that a rule is automatically fixable by the `--fix` com | C413 | UnnecessaryCallAroundSorted | Unnecessary `(list\|reversed)` call around `sorted()` | | | C414 | UnnecessaryDoubleCastOrProcess | Unnecessary `(list\|reversed\|set\|sorted\|tuple)` call within `(list\|set\|sorted\|tuple)()` | | | C415 | UnnecessarySubscriptReversal | Unnecessary subscript reversal of iterable within `(reversed\|set\|sorted)()` | | -| C416 | UnnecessaryComprehension | Unnecessary `(list\|set)` comprehension (rewrite using `(list\|set)()`) | | +| C416 | UnnecessaryComprehension | Unnecessary `(list\|set)` comprehension (rewrite using `(list\|set)()`) | | | C417 | UnnecessaryMap | Unnecessary `map` usage (rewrite using a `(list\|set\|dict)` comprehension) | | ### flake8-bugbear diff --git a/src/checks.rs b/src/checks.rs index edf15b1d12..258a07a620 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -1150,7 +1150,7 @@ impl CheckKind { format!("Unnecessary subscript reversal of iterable within `{func}()`") } CheckKind::UnnecessaryComprehension(obj_type) => { - format!(" Unnecessary `{obj_type}` comprehension (rewrite using `{obj_type}()`)") + format!("Unnecessary `{obj_type}` comprehension (rewrite using `{obj_type}()`)") } CheckKind::UnnecessaryMap(obj_type) => { if obj_type == "generator" {