Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect f-string parsing #88

Open
charliermarsh opened this issue Jun 13, 2023 · 1 comment
Open

Incorrect f-string parsing #88

charliermarsh opened this issue Jun 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@charliermarsh
Copy link
Contributor

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
Copy link
Contributor

yt2b commented Jan 20, 2024

I'll look into StringParser.parse_fstring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants