Python pylint 1.6.3报告用于xml的E1101(无成员)

Python pylint 1.6.3报告用于xml的E1101(无成员),python,pylint,Python,Pylint,我们在我们的项目中使用了。这来自标准库,但出于某种原因,pylint无法使用它。它总是报告ElementTree对象上任何引用的E1101。下面是一段示例代码来演示这一点: import xml.etree.ElementTree as ET test = ET.parse('test.xml') config = test.find('.//configuration') print(config) for role in config.findall('.//role'): pr

我们在我们的项目中使用了。这来自标准库,但出于某种原因,pylint无法使用它。它总是报告ElementTree对象上任何引用的E1101。下面是一段示例代码来演示这一点:

import xml.etree.ElementTree as ET

test = ET.parse('test.xml')
config = test.find('.//configuration')
print(config)

for role in config.findall('.//role'):
    print(role)
pylint的输出总是抛出E1101:

$ pylint --rcfile=pylint.cfg -E test.py
************* Module orion-scripts.test
E:  7,12: Instance of 'int' has no 'findall' member (no-member)
但是程序运行得很好:

$ python test.py
<Element 'role' at 0x1052dfe50>
<Element 'configuration' at 0x1052dfe10>
$ 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)]