running pylint against
http://bazaar.launchpad.net/~zeitgeist/zeitgeist/zeitgeist-0.8/view/head:/zeitgeist/__init__.py
results in:
No config file found, using default configuration
************* Module __init__
C: 25,0: Line too long (96/80)
C: 26,0: Line too long (93/80)
C: 1,0: Missing docstring
C: 4,0: Invalid name "runpath" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
W: 14,4: Reimport 'os' (imported line 2)
W: 15,4: Reimport 'sys' (imported line 1)
W: 17,4:RepositoryConfig: Class has no __init__ method
C: 17,4:RepositoryConfig: Missing docstring
Traceback (most recent call last):
File "/usr/bin/pylint", line 4, in <module>
lint.Run(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 863, in __init__
linter.check(args)
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 496, in check
self.check_astng_module(astng, walker, rawcheckers)
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 568, in check_astng_module
walker.walk(astng)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 528, in walk
self.walk(child)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 528, in walk
self.walk(child)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 528, in walk
self.walk(child)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 528, in walk
self.walk(child)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 525, in walk
cb(astng)
File "/usr/lib/python2.7/site-packages/pylint/checkers/variables.py", line 433, in visit_name
self._loopvar_name(node, name)
File "/usr/lib/python2.7/site-packages/pylint/checkers/variables.py", line 335, in _loopvar_name
if not astmts or astmts[0].statement().parent_of(node):
File "/usr/lib/python2.7/site-packages/logilab/astng/bases.py", line 410, in statement
return self.parent.statement()
AttributeError: 'NoneType' object has no attribute 'statement'
|
Comments
-
2011/11/21 11:07
-
2011/11/21 11:48, written by mrunge
-
2011/11/23 18:58, written by mrunge
-
2012/01/19 15:53, written by sthenault
-
2012/07/20 13:11, written by lothiraldan
add commentcould you provide the output of pylint --version please ?
of course
pylint --version
No config file found, using default configuration
pylint 0.24.0,
astng 0.23.0, common 0.57.1
Happens with earlier version, too:
AttributeError: 'NoneType' object has no attribute 'statement'
[mrunge@herodot Downloads]$ pylint --version
No config file found, using default configuration
pylint 0.23.0,
astng 0.21.1, common 0.55.1
Python 2.7.2 (default, Oct 27 2011, 01:40:22)
[GCC 4.6.1 20111003 (Red Hat 4.6.1-10)]
I tried to run pylint on the zeitgeist installed on my ubuntu natty but it worked without any problem. (zeitgeist 0.7.1)
trying 0.8 is painful (downloaded but ./configure complains, and no problem without C compiled exts)
Do you have the same pb with 0.7.1? Is there an easy way to get 0.8.1 without modifying my system?
FYI, I have
Could not reproduce with:
pylint --version
No config file found, using default configuration
pylint 0.25.1,
astng 0.23.1, common 0.58.0
Python 2.7.3 (default, Apr 27 2012, 00:16:35)