1
我使用pylint的多年现在刚刚上的Python 2.7.6pylint的1.2.1 - AttributeError的:“模块”对象有没有属性“future_imports”
安装pylint的1.2.1当我运行pylint的1.2 0.1(内PyScripter 2.5.3)上的任何Python脚本,我得到错误日志:
Command line: D:\PROGRA~1\Python27\python.exe D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py "E:\test\dotnetver.py" --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"
Working directory:
Timeout: 0 ms
************* Module dotnetver
E:\test\dotnetver.py:2: [I0011(locally-disabled), ] Locally disabling missing-docstring (C0111)
No config file found, using default configuration
Traceback (most recent call last):
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 1106, in <module>
Run(sys.argv[1:])
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 1051, in __init__
linter.check(args)
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 626, in check
self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 708, in check_astroid_module
checker.process_module(astroid)
File "D:\PROGRA~1\Python27\lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\checkers\format.py", line 477, in process_module
if 'print_function' in module.future_imports:
AttributeError: 'Module' object has no attribute 'future_imports'
Process "Pylint" terminated, ExitCode: 00000001
这是在新版本pylint的一个BUG或者有我错过了什么?
你应该更新星形线以及 – sthenault