-
Notifications
You must be signed in to change notification settings - Fork 188
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
Parsing does not raise error for code assigning to a function call #916
Comments
So, I'm looking at whether to place this validation in LibCST/libcst/_nodes/expression.py Lines 286 to 301 in ea19578
since 3.9 the python grammar does define the valid assignment targets
so I thought I'd add a |
@zsol any thoughts on the above? |
The native parser correctly raises a syntax error here. So to work around you can set the |
Oh, I totally thought I tested it with |
Gonna close this out as native parser is enabled by default in 1.0.0 |
LibCST will happily parse the following code:
However this is a syntax error, as you can't assign to function calls, and ideally would be raised as such.
(Tested on libcst 0.4.9)
The text was updated successfully, but these errors were encountered: