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
A little bit of copy paste from the previous answer to summarize what is working (at least for me: debian-jessie)
In some older version of pylint
there was a problem preventing it working with numpy (and other similar packages).
Now that problem has been solved but external C packages (python interfaces to C code -like numpy-) are disabled by default for security reasons.
You can create a white list, to allow pylint
to use them in the file ~/.pylintrc
.
Basic command to run: # ONLY if you do not already have a .pylintrc file in your home $ pylint --generate-rcfile > .pylintrc
Then open the file and add the packages you want after extension-pkg-whitelist=
separated by comma. You can have the same behavior using the option --extension-pkg-whitelist=numpy
from the command line.
If you ignore some packages in the [TYPECHECK]
section that means that pylint
will never show error related to that packages. In practice, pylint
will not tell you anything about those packages.