[Python-projects] pylint bug report

Aufrant Olivier olivier.aufrant at polytechnique.fr
Mon Jun 18 13:30:34 CEST 2007


Hello,
I've found a strange bug involving "from / import / as" statements in pylint.

If in a program I put at the beginning :
from numpy import sqrt as np_sqrt
import numpy

Then using the "numpy.sqrt" function later in this script will trigger  
a pylint error, while using "np_sqrt" won't, everything else  
unchanged. The pylint error message follows

I'm using pylint embedded in Eclipse/pydev (last version for all) on  
windows XP

Best regards,
Olivier Aufrant



#Pylint error message part

Pylint: The stderr of the command line is: Traceback (most recent call last):
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
947, in <module>
     Run(sys.argv[1:])
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
890, in __init__
     linter.check(args)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
496, in check
     self.check_file(filepath, modname, checkers)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
513, in check_file
     astng = self._check_file(filepath, modname, checkers)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
537, in _check_file
     if not self.check_astng_module(astng, checkers):
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
599, in check_astng_module
     if implements(checker, IASTNGChecker)])
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
616, in astng_events
     self.astng_events(child, checkers, _reversed_checkers)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
616, in astng_events
     self.astng_events(child, checkers, _reversed_checkers)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
616, in astng_events
     self.astng_events(child, checkers, _reversed_checkers)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
616, in astng_events
     self.astng_events(child, checkers, _reversed_checkers)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
616, in astng_events
     self.astng_events(child, checkers, _reversed_checkers)
   File "C:\Utils\Python25\Lib\site-packages\pylint\lint.py", line  
613, in astng_events
     checker.visit(astng)
   File "c:\utils\python25\Lib\site-packages\logilab\astng\utils.py",  
line 84, in visit
     method(node)
   File  
"c:\utils\python25\Lib\site-packages\pylint\checkers\typecheck.py",  
line 183, in visit_callfunc
     if called is not None and not called.callable():
   File  
"c:\utils\python25\Lib\site-packages\logilab\astng\__init__.py", line  
203, in callable
     self._proxied.getattr('__call__')
AttributeError: From instance has no attribute 'getattr'

----------------------------------------------------------------
This message was sent using X-WebMail



More information about the Python-Projects mailing list