Describe the bug
Black fails to format an f-string, containing a triple quoted string, that has a new line in it.
To Reproduce
For example, take this code:
And run it with these arguments:
The resulting error is:
error: cannot format a.py: Cannot parse: 1:9: a = f'''{"""
Expected behavior
The file should be formatted. I am not sure how this should get formatted though. The code is valid for both versions of python that i tested.
Environment
- Black's version: 24.4.2
- OS and Python version: Ubuntu 24.04 and Python 3.12/3.10 (fails on both)
P.S.: This seems somewhat similar to #4350?
Describe the bug
Black fails to format an f-string, containing a triple quoted string, that has a new line in it.
To Reproduce
For example, take this code:
And run it with these arguments:
The resulting error is:
Expected behavior
The file should be formatted. I am not sure how this should get formatted though. The code is valid for both versions of python that i tested.
Environment
P.S.: This seems somewhat similar to #4350?