-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Linting not showing 'undefined-variable' error with 'generated-members' pylint args #11778
Comments
Related #11213 |
Yes, but running from terminal with the pylint args does show the error, only in the editor it doesn't show up |
In that case, especially with conda, I would try this: open anaconda prompt (outside of VS Code), navigate to your project. Activate conda environment there, and then open vscode from that prompt using either |
If I understand what you mean, I actually can't, I'm using an SSH remote,
therefore I have to start VS Code first before I can access the folder.
Il Mer 13 Mag 2020, 20:00 Karthik Nadig <[email protected]> ha
scritto:
… In that case, especially with conda, I would try this: open anaconda
prompt (outside of VS Code), navigate to your project. Activate conda
environment there, and then open vscode from that prompt using either code
. or code my.code-workspace.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11778 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADMONLMTJ5HI4JUEP46QJZTRRLN4DANCNFSM4M7SKWGQ>
.
|
Ah! I missed that. I will look into this. |
I have the same issues on my laptop, no python environments here, with (for example), the code
Here, ProcExec is not defined, nor imported in the rest of the module, but VS Code doesn't show any error in the editor.
Again, I have just put Is there any solution for this problem? I'm using the official build, on Arch Linux, with python 3.8.3 |
@fabmazz in the python logs what does it show. This is what i get with just the above code in a file:
|
As in the first post about the issue, the Python log shows the error when linting, it's simply not displayed in the editor. |
I think the length of the file is important. When it reaches about 200~300 lines, the linter messages get suppressed |
I have encountered a similar issue when including the "python.linting.pylintArgs": [
// "--extension-pkg-whitelist=kivy",
"--disable=all",
"--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode",
] Given the following sample code: # test.py
from kivy.uix.screenmanager import Screen
class foo(Screen):
def bar(self):
abcdefg += 1 Running pylint through the command line with or without including the
However, that error only generates a red squiggle in vscode when the However, in another file that I have (<100 lines) the error is not visible regardless of that line's location, though the error is still present when run from the command line. Once again, the 'undefined-variable If the errors were not present in pylint, I would attribute it to either a bug or an intended feature of pylint. As the errors are still present when running pylint through the command line, however, and there does not appear to be any consistency for when and where this error occurs, I have no idea what the issue might be. For reference, here's what I get when running
|
Is this still an issue? |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off. |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Jedipython.languageServer
setting: JediAdditional Settings:
Expected behaviour
I have a file in which there is an error, by mistake I used a wrong name for the variable.
Therefore, in the editor, it should be marked in red in the editor.
Actual behaviour
The error is not reported on the editor, I don't get any indication that there is one, as you can see in this image
However if I run pylint with the same arguments I get:
amongst the rest of the warnings.
Steps to reproduce:
I can't put the whole file of code, but I can give this small snippet which exemplifies the problem:
Logs
Output of the Python extension:
Personal considerations
So the error is caught by the extension, but it is not displayed in the editor in any way (see the link above).
If I remove the pylint args in the settings, the error is displayed again, but so are all the - incorrect - errors of "numpy has no member... ".
The text was updated successfully, but these errors were encountered: