from
Neil Benn <benn at cenix-bioscience dot com>
to
Python-Projects <python-projects at lists dot logilab dot org>
subject
[Python-projects] Tracing PyLint
date
Hello,2005/07/20 15:32
I'm running pylint across a codebase (which contains a lot of
magic <I didn't write it!>) and I'm getting an error from pylint as follows:
----------------------
C:\Documents and Settings\benn.CENIX-SCIENCE\My
Documents\svnfiles\CeLMA>python "c:\program
files\python23\Lib\site-packages\pylint\lint.py" --rcfile
Tools\pylint-pdk-config.prop --files-output=y
--disable-msg=W0223,C0301,R0921,R0922 Contrib\pdk
Traceback (most recent call last):
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 769, in ?
Run(sys.argv[1:])
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 730, in __init__
linter.check(args)
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 410, in check
self.check_file(filepath, modname, checkers)
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 436, in check_file
self._check_file(filepath, modname, checkers)
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 450, in _check_file
self.check_astng_module(astng, checkers)
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 497, in check_astng_module
self.astng_events(astng, [checker for checker in checkers
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 514, in astng_events
self.astng_events(child, checkers)
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 514, in astng_events
self.astng_events(child, checkers)
File "c:\program files\python23\Lib\site-packages\pylint\lint.py",
line 511, in astng_events
checker.visit(astng)
File "c:\program
files\python23\Lib\site-packages\logilab\common\astng\utils.py", line
94, in visit
method(node)
File "c:\program
files\python23\Lib\site-packages\pylint\checkers\format.py", line 279,
in visit_default
msg_def = check_line(self._lines[line], self)
File "c:\program
files\python23\Lib\site-packages\pylint\checkers\format.py", line 139,
in check_line
clean_str = STRING_RGX.sub('', line)
RuntimeError: maximum recursion limit exceeded
----------------------
Now I'm assuming tha there is some kind of magic which is causing
the problem in pyLint - however looking at the file produced, the last
module checked was simply a file containg a load of Base64 encoded
images as constants so I think that nothing is happening there. So it
must be the next module which is inspected that is causing the problem,
however there is no listing for the module which is blowing up (so I
assume that it is a first pass so I can't get info). I was thinking of
running pyLint and keeping the interpreter alive and digging through the
loaded namespace areas to find out the values for module and code line
currently being inspected to cause PyLint to throw the error but I don't
really know what I'm looking for.
Is this the way to determine what pyLint is currently looking at?
If so then what should I be looking at, if not could someone please
suggest as to a useful method to determine what code is causing (Module
and line) is causing PyLint to blow up on me.
The code is open sourced so if you want to try this for yourself
then the source code can be checked out using svn with the command line:
svn co http://svn.pdk.python-hosting.com/trunk pdk
SVN can be got from :
http://subversion.tigris.org/
Or for Windows users (Beware that gis has shell extensions and requires
a windows reboot to work properly) :
http://tortoisesvn.tigris.org/
Also attached is the rc file I'm using.
Any/all help greatly appreciated.
Cheers,
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-mail : benn@cenix-bioscience.com
Cenix Website : http://www.cenix-bioscience.com
