-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Linter panic] failing to parse odd f-string f"{x, y=}"
#6831
Comments
Thanks! |
I spent a few minutes in debugging and the problem is two fold:
Now, considering the extraction of leading and trailing values in (3), for If we add the parentheses ourselves i.e., |
This might require re-working the way We'll have to extract the whitespace surrounding the expression and not consider them part of the parsed expression. But, this might not be necessary when the new 3.12 f-string parser is complete because we won't be re-parsing the expression from string, we'd do that from the tokens. |
how far away is the new parser? are we ok to just wait? if not maybe we can try to just strip leading whitespace and not add parentheses? |
Hey, sorry for not replying soon, I somehow missed this in the notifications. You can track the parser progress at #7041 and that fixes this issue. I think we're ok to wait as otherwise the fix would become redundant. |
Even after merging #7041, I have multiple crashes with different rules
B020
|
Hey, it's not yet merged in |
The text was updated successfully, but these errors were encountered: