This issue is to kickoff a discussion around the formatting for f-strings. With PEP 701, f-strings changes the behavior with what kind of syntax is allowed:
- Comments inside f-strings:
# comment 0
f"""
{ # comment 1
# comment 2
foo # comment 3
# comment 4
}""" # comment 5
- F-strings can be nested within f-strings
f"first {f"second {f"third ..."} second"} first"
- Quotes can be repeated inside nested f-strings (for both strings and f-strings)
f"double quotes {"same quotes in strings" + f"same quotes in f-strings"}"
This means that the formatter needs to be updated to possibly handle f-strings on it's own. Currently, it's handled as part of string formatting.
This issue is to kickoff a discussion around the formatting for f-strings. With PEP 701, f-strings changes the behavior with what kind of syntax is allowed:
f"first {f"second {f"third ..."} second"} first"f"double quotes {"same quotes in strings" + f"same quotes in f-strings"}"This means that the formatter needs to be updated to possibly handle f-strings on it's own. Currently, it's handled as part of string formatting.