python - pylint 1.6.3 reports E1101(no-member) for xml -
we using elementtree library in our project. comes standard library, reason pylint chokes on it. reports e1101 on reference on elementtree object. here sample bit of code demonstrate this:
import xml.etree.elementtree et test = et.parse('test.xml') config = test.find('.//configuration') print(config) role in config.findall('.//role'): print(role)
the output pylint throws e1101:
$ pylint --rcfile=pylint.cfg -e test.py ************* module orion-scripts.test e: 7,12: instance of 'int' has no 'findall' member (no-member)
but program runs fine:
$ python test.py <element 'role' @ 0x1052dfe50> <element 'configuration' @ 0x1052dfe10>
i found number of solutions similar problems, far none have worked one. i've tried:
- setting ignored class
ignored-classes=xml.etree.elementtree
- setting generated member
generated-members=et
- allowing extension run
unsafe-load-any-extension=yes
nothing has worked , i'm ignoring e1101 messages. however, bad option , prefer ignore particular class. if helps, version info pylint:
$ pylint --version no config file found, using default configuration pylint 1.6.3, astroid 1.4.7 python 2.7.11 (default, jan 22 2016, 08:28:37) [gcc 4.2.1 compatible apple llvm 7.0.2 (clang-700.1.81)]
Comments
Post a Comment