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
In Python 3.12, black formatter may change the content of string in nested f-strings
To Reproduce
For example, take this code:
def test(parts: list[str]): print(f"{"-".join(parts)}")
And run it with these arguments:
$ black test.py --target-version=py312
The resulting error is:
contents changed to:
def test(parts: list[str]): print(f"{" - ".join(parts)}")
Expected behavior
contents of string should NOT change
Environment
Additional context
The text was updated successfully, but these errors were encountered:
Duplicate of #3746 (if you use Black's default settings, you get an error on this example, Black doesn't currently support PEP 701 at all)
Sorry, something went wrong.
No branches or pull requests
Describe the bug
In Python 3.12, black formatter may change the content of string in nested f-strings
To Reproduce
For example, take this code:
And run it with these arguments:
The resulting error is:
contents changed to:
Expected behavior
contents of string should NOT change
Environment
Additional context
The text was updated successfully, but these errors were encountered: