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
Quoted annotations should be parsed as if parenthesized #9467
Comments
Should this be implemented in the parser layer or here where we emit the warning? |
I think it should be implemented in the ruff/crates/ruff_python_parser/src/typing.rs Lines 22 to 44 in a0263ab
I would also suggest to look at other references of |
Nice, I can work on this. |
It was recently agreed that quoted annotations should be parsed as if they were implicitly wrapped in parentheses. So, e.g., they can contain otherwise-invalid indentation, newlines within binary operators, etc.
See: microsoft/pyright#6940 (comment)
The text was updated successfully, but these errors were encountered: