You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PEP 701 (Python 3.12) introduced the ability to reuse the same quote type (e.g. ") within f-strings. Black is unable to parse this new structure, causing the formatter to fail.
To Reproduce
For example, take this code:
name="cool_guy"works=f"hello {cool_guy.replace('_', ' ')}"broken=f"hello {cool_guy.replace("_", " ")}"# now possible in Python 3.12
Describe the bug
PEP 701 (Python 3.12) introduced the ability to reuse the same quote type (e.g.
"
) within f-strings. Black is unable to parse this new structure, causing the formatter to fail.To Reproduce
For example, take this code:
And run it with these arguments:
The resulting error is:
Expected behavior
Expect Black to succeed and properly format the file.
Environment
Additional context
None
The text was updated successfully, but these errors were encountered: