landscapeio / landscape-issues

The public issue tracker for Landscape.io (https://landscape.io)
15 stars 1 forks source link

Pylint no-member #221

Closed jamlamberti closed 4 years ago

jamlamberti commented 8 years ago

For certain modules (e.g. numpy), pylint has a hard time figuring out what the member functions are.

Example: landscape

A fix for this was made in astroid and pylint, which made a significant improvement at detecting member functions (see https://bitbucket.org/logilab/pylint/issues/58).

It might be worth upgrading both astroid and pylint as it will fix the issue. My local pylint install correctly identifies eye as a member of numpy.

$ pylint --version
pylint 2.0.0, 
astroid 1.5.0
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010]
jamlamberti commented 8 years ago

The best fix I have so far is instead of ignoring all of numpy (or disabling the no-member issue), you can list some of the generated members in the pylint.rc file.

For example:

[TYPECHECK]
...
generated-members=numpy.median,numpy.eye,numpy.cov
...