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 cannot parse fstrings with one line if statements
To Reproduce
For example, take this code:
a = f'{'1' if 1 else '2'}'
And run it with these arguments:
$ black file.py --target-version py39
The resulting error is:
error: cannot format cogs\black.py: Cannot parse: 4:11: a = f'{'1' if 1 else '2'}' Oh no! 💥 💔 💥 1 file failed to reformat.
Expected behavior
A "cannot parse" error does not occur and the formatter is able to continue on parsing through the rest of the file.
Environment
The text was updated successfully, but these errors were encountered:
Duplicate of #3746
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Black cannot parse fstrings with one line if statements
To Reproduce
For example, take this code:
And run it with these arguments:
The resulting error is:
Expected behavior
A "cannot parse" error does not occur and the formatter is able to continue on parsing through the rest of the file.
Environment
The text was updated successfully, but these errors were encountered: