Black changes f-string into string even though there is a substitution in it. #1469
Labels
C: invalid code
Black destroyed a valid Python file
F: strings
Related to our handling of strings
T: bug
Something isn't working
Describe the bug:
Black changes f-string into string even though there is a substitution in it.
To Reproduce:
Contents of the log file:
Expected behavior:
I would expect Black to not touch that f-string.
Environment:
--experimental-string-processing
flag)Does this bug also happen on master?
It only happens on master, it doesn't happen on current release as there's no string reformatting in it yet. Online formatter doesn't error, but it does produce this output which is obviously not equivalent to the original:
Additional context:
None
I'm sorry for the amount of issues but I tried to run Black's master on Cog-Creators/Red-DiscordBot's code base which resulted in quite a few of errors and also some undesired (by me) changes which I wanted to at least report even if they're not gonna be changed.
The text was updated successfully, but these errors were encountered: