Open charliermarsh opened 1 year ago
Originally reported as https://github.com/astral-sh/ruff/issues/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
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
I'll look into StringParser.parse_fstring.
StringParser.parse_fstring
Originally reported as https://github.com/astral-sh/ruff/issues/5044: