Skip to content

Commit df3932f

Browse files
Use file-specific quote for C408 (#3128)
1 parent 817d0b4 commit df3932f

File tree

1 file changed

+4
-2
lines changed
  • crates/ruff/src/rules/flake8_comprehensions

1 file changed

+4
-2
lines changed

crates/ruff/src/rules/flake8_comprehensions/fixes.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,13 @@ pub fn fix_unnecessary_collection_call(
522522
// Quote each argument.
523523
for arg in &call.args {
524524
let quoted = format!(
525-
"\"{}\"",
525+
"{}{}{}",
526+
stylist.quote(),
526527
arg.keyword
527528
.as_ref()
528529
.expect("Expected dictionary argument to be kwarg")
529-
.value
530+
.value,
531+
stylist.quote(),
530532
);
531533
arena.push(quoted);
532534
}

0 commit comments

Comments
 (0)