f-string formatting: Consider format specs when choosing the preferred quotes #13935
Labels
formatter
Related to the formatter
help wanted
Contributions especially welcome
preview
Related to preview mode features
The new preview style formats
as
f"{1:\"\"}"
This is correct but results in unnecessary escapes. I think we should account for the quotes in format-specs when choosing the preferred quotes for an f-string.
This can be changed here
ruff/crates/ruff_python_formatter/src/string/normalize.rs
Lines 264 to 295 in 113ce84
CC: @dhruvmanila
The text was updated successfully, but these errors were encountered: