pylint
pylint copied to clipboard
zmq no-member false positives even with extension loading enabled
Originally reported by: Chris Rebert (BitBucket: cvrebert, GitHub: @cvrebert?)
Testcase file:
#!python
# qux.py
from __future__ import print_function
import zmq
print(zmq.POLLIN)
Relevant portion of my pylint.rc:
#!ini
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=yes
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=zmq,qux
However, pylint still doesn't seem to be loading zmq:
#!bash
$ pip install pyzmq==14.5.0
<succeeds>
$ pylint --rcfile=pylint.rc -r n -f parseable qux.py
Warning: option include-ids is deprecated and ignored.
Warning: option symbols is deprecated and ignored.
************* Module qux
qux.py:1: [C0111(missing-docstring), ] Missing module docstring
qux.py:4: [E1101(no-member), ] Module 'zmq' has no 'POLLIN' member
$ python qux.py
1
$
I am using bleeding-edge pylint & astroid, pip-installed from the mercurial repos.
#!bash
$ pylint --version
No config file found, using default configuration
pylint 1.4.1,
astroid 1.3.4, common 0.63.2
Python 2.7.9 (default, Feb 13 2015, 20:19:10)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)]
- Bitbucket: https://bitbucket.org/logilab/pylint/issue/478