I am running PyLint on a Python project. PyLint makes many complaints about being unable to find numpy members. How can I avoid this while avoiding skipping membership check
I had the same problem with a different module (kivy.properties
) which is a wrapped C module like numpy
.
Using VSCode V1.38.0, the accepted solution stopped all linting for the project. So, while it did indeed remove the false-positive no-name-in-module
, it didn't really improve the situation.
The best workaround for me was to use the --ignored-modules
argument on the offending module. Trouble is, passing any argument via python.linting.pylintArgs
wipes out the default VSCode settings, so you need to re-set those also. That left me with the following settings.json file:
{
"python.pythonPath": "C:\\Python\\Python37\\python.exe",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.linting.pylintArgs": [
"--ignored-modules=kivy.properties",
"--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"
]
}