-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Pylint not underlining full expressions in VS Code #3061
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
Comments
Hi @theodoretliu This looks like an issue with
As you can see it correctly detects the cases you mentioned, but I'm afraid that VSCode itself might be doing something to hide certain errors from you. |
So I agree that This seems to be a shortcoming of |
It does seem like this broader issue of not having the ending It seems like Python 3.8 will have these notations in the AST, so until its official release and adoption, there's probably no easy fix to this problem. |
Thank you @theodoretliu for the explanation, that makes sense now. Indeed, most of the them we hit various shortcomings of |
Steps to reproduce
in Visual Studio Code
pylint
insettings.json
by adding the following lines.pylint
runs on the file created in step 1. Note the underlining.Current behavior
Only the
1
in the "useless expression" is underlined. Only thefrom
in the import statement is underlined.Expected behavior
I would expect the entire "useless expression" - the
1 + 2
- to be underlined. I expect the entire import statement to be underlined.I ran into this problem while developing a custom
pylint
extension. When I didself.add_message
to a node of the AST, only the first token of that node ever got underlined, even if there were multiple tokens in that AST.pylint --version output
The text was updated successfully, but these errors were encountered: