Skip to content

Commit

Permalink
Use file-specific quote for C408 (#3128)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Feb 22, 2023
1 parent 817d0b4 commit df3932f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/ruff/src/rules/flake8_comprehensions/fixes.rs
Expand Up @@ -522,11 +522,13 @@ pub fn fix_unnecessary_collection_call(
// Quote each argument.
for arg in &call.args {
let quoted = format!(
"\"{}\"",
"{}{}{}",
stylist.quote(),
arg.keyword
.as_ref()
.expect("Expected dictionary argument to be kwarg")
.value
.value,
stylist.quote(),
);
arena.push(quoted);
}
Expand Down

0 comments on commit df3932f

Please sign in to comment.