We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
a = f'''{""" """}'''
And run it with these arguments:
$ black file.py
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
P.S.: This seems somewhat similar to #4350?
The text was updated successfully, but these errors were encountered:
Is problem actual?
Sorry, something went wrong.
Hmm... Still throws an error for me.
python 3.10:
python 3.12:
Which version of black are you using?
This is fixed on main, but hasn't been released yet.
main
Fixed by #4339
No branches or pull requests
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?
The text was updated successfully, but these errors were encountered: