Skip to content

Commit

Permalink
C401 message missing closing parenthesis (#13498)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Sep 24, 2024
1 parent ff4b6d1 commit 03503f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl AlwaysFixableViolation for UnnecessaryGeneratorSet {
#[derive_message_formats]
fn message(&self) -> String {
if self.short_circuit {
format!("Unnecessary generator (rewrite using `set()`")
format!("Unnecessary generator (rewrite using `set()`)")
} else {
format!("Unnecessary generator (rewrite as a `set` comprehension)")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ C401.py:12:17: C401 [*] Unnecessary generator (rewrite as a `set` comprehension)
14 14 |
15 15 | # Short-circuit case, combine with C416 and should produce x = set(range(3))

C401.py:16:5: C401 [*] Unnecessary generator (rewrite using `set()`
C401.py:16:5: C401 [*] Unnecessary generator (rewrite using `set()`)
|
15 | # Short-circuit case, combine with C416 and should produce x = set(range(3))
16 | x = set(x for x in range(3))
Expand All @@ -123,7 +123,7 @@ C401.py:16:5: C401 [*] Unnecessary generator (rewrite using `set()`
18 18 | x for x in range(3)
19 19 | )

C401.py:17:5: C401 [*] Unnecessary generator (rewrite using `set()`
C401.py:17:5: C401 [*] Unnecessary generator (rewrite using `set()`)
|
15 | # Short-circuit case, combine with C416 and should produce x = set(range(3))
16 | x = set(x for x in range(3))
Expand All @@ -149,7 +149,7 @@ C401.py:17:5: C401 [*] Unnecessary generator (rewrite using `set()`
21 19 | print(f"{set(a for a in 'abc') - set(a for a in 'ab')}")
22 20 | print(f"{ set(a for a in 'abc') - set(a for a in 'ab') }")

C401.py:20:16: C401 [*] Unnecessary generator (rewrite using `set()`
C401.py:20:16: C401 [*] Unnecessary generator (rewrite using `set()`)
|
18 | x for x in range(3)
19 | )
Expand All @@ -170,7 +170,7 @@ C401.py:20:16: C401 [*] Unnecessary generator (rewrite using `set()`
22 22 | print(f"{ set(a for a in 'abc') - set(a for a in 'ab') }")
23 23 |

C401.py:21:10: C401 [*] Unnecessary generator (rewrite using `set()`
C401.py:21:10: C401 [*] Unnecessary generator (rewrite using `set()`)
|
19 | )
20 | print(f"Hello {set(a for a in range(3))} World")
Expand All @@ -190,7 +190,7 @@ C401.py:21:10: C401 [*] Unnecessary generator (rewrite using `set()`
23 23 |
24 24 |

C401.py:21:34: C401 [*] Unnecessary generator (rewrite using `set()`
C401.py:21:34: C401 [*] Unnecessary generator (rewrite using `set()`)
|
19 | )
20 | print(f"Hello {set(a for a in range(3))} World")
Expand All @@ -210,7 +210,7 @@ C401.py:21:34: C401 [*] Unnecessary generator (rewrite using `set()`
23 23 |
24 24 |

C401.py:22:11: C401 [*] Unnecessary generator (rewrite using `set()`
C401.py:22:11: C401 [*] Unnecessary generator (rewrite using `set()`)
|
20 | print(f"Hello {set(a for a in range(3))} World")
21 | print(f"{set(a for a in 'abc') - set(a for a in 'ab')}")
Expand All @@ -229,7 +229,7 @@ C401.py:22:11: C401 [*] Unnecessary generator (rewrite using `set()`
24 24 |
25 25 | # Not built-in set.

C401.py:22:35: C401 [*] Unnecessary generator (rewrite using `set()`
C401.py:22:35: C401 [*] Unnecessary generator (rewrite using `set()`)
|
20 | print(f"Hello {set(a for a in range(3))} World")
21 | print(f"{set(a for a in 'abc') - set(a for a in 'ab')}")
Expand Down

0 comments on commit 03503f7

Please sign in to comment.