Incorrect f-string parsing
charliermarsh opened this issue · 1 comments
charliermarsh commented
Originally reported as astral-sh/ruff#5044:
Not the best string ever, but ruff doesn't handle it like Python
λ cat test.py print(f"$N_{{img}}\in\{{0,1,2\}}$") λ python test.py $N_{img}\in\{0,1,2\}$ λ ruff check test.py --select F401 error: Failed to parse test.py:1:25: f-string: unterminated string
yt2b commented
I'll look into StringParser.parse_fstring
.