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
When reformatting a triple-quote string, black fails with an internal error.
To Reproduce
Take this code:
if__name__=="__main__":
""" This string... ... will confuse black. """pass
And run it with these arguments:
$ black file.py
The resulting error is:
error: cannot format blackerrdemo.py: INTERNAL ERROR: Black produced code that is not equivalent to the source. Please report a bug on https://github.com/psf/black/issues. This diff might be helpful: /tmp/blk_d030my1_.log
Oh no! 💥 💔 💥
1 file failed to reformat.
Expected behavior
Black should leave the string untouched or, if it decides to reformat it, reformat it without failure.
Describe the bug
When reformatting a triple-quote string, black fails with an internal error.
To Reproduce
Take this code:
And run it with these arguments:
The resulting error is:
Expected behavior
Black should leave the string untouched or, if it decides to reformat it, reformat it without failure.
Environment
Additional context
Reproduced with branch main at commit c9d2635
The text was updated successfully, but these errors were encountered: