EOF in multi-line string error for valid format string #4588
Labels
C: parser
How we parse code. Or fail to parse it.
F: strings
Related to our handling of strings
T: bug
Something isn't working
Describe the bug
Black errs on format string while Python runs the code without error.
To Reproduce
And run it with these arguments:
The resulting error is:
Expected behavior
The same code but formatted. Python does accept this input and will print
y
.Environment
$ black --version black, 25.1.0 (compiled: yes) Python (CPython) 3.10.12 $ python3 --version Python 3.10.12 $ uname -a Linux ubuntu 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: