from
Kring Gerhard <gerhard.kring at siemens dot com>
to
Sylvain Thenault <syt at logilab dot fr>
subject
AW: [Python-projects] WG: pyLint problems with inheritance
date
Hello Sylvain,2005/01/04 18:59
here is the traceback when I run the pyLint for the attached file. The only special thing here is a double CR between the two prints.
Traceback (most recent call last):
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 860, in ?
Run(sys.argv[1:])
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 798, in __
it__
linter.check(modnames)
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 473, in ch
k
self.check_module(mod_name, checkers, rev_checkers)
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 494, in ch
k_module
self._check_module(mod_name, checkers, rev_checkers)
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 509, in _c
ck_module
self.check_astng_module(astng, checkers)
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 556, in ch
k_astng_module
self.astng_events(astng, [checker for checker in checkers
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 573, in as
g_events
self.astng_events(child, checkers)
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 573, in as
g_events
self.astng_events(child, checkers)
File "C:\Python23\lib\site-packages\logilab\pylint\lint.py", line 570, in as
g_events
checker.visit(astng)
File "C:\Python23\lib\site-packages\logilab\common\astng\utils.py", line 75,
n visit
method(node)
File "C:\Python23\lib\site-packages\logilab\pylint\checkers\format.py", line
92, in visit_default
msg_def = check_line(self._lines[line], self)
KeyError: 4
Best Regards / Mit freundlichen Grüßen
Gerhard Kring
>Siemens AG
>Communications
Com CD NI DB D
>St.-Martin-Str. 76
>D-81541 München
>Room: 5531/356
>
>T.+49-89-636-76219
>Mobile +49-178-7700355
Email: Gerhard.Kring@siemens.com
-----Ursprüngliche Nachricht-----
Von: Sylvain.Thenault@logilab.fr [mailto:Sylvain.Thenault@logilab.fr]
Gesendet: Dienstag, 4. Januar 2005 10:51
An: Kring Gerhard
Cc: python-projects@logilab.org
Betreff: Re: [Python-projects] WG: pyLint problems with inheritance
On Tuesday 04 January à 08:38, Kring Gerhard wrote:
> Hello Sylvain,
Hello
> thank you for your detailed response!
> I really want to propose broad usage of the pyLint Tools within our python projects.
> The only real blocking point is the "module location/import" problem...
yes, I personally think this problem is very annoying to, so I expect to
fix it in the next release.
> 1. Concerning the linelength problem:
> - my understanding is that you import the module and then do the code analysis based on this. With the imported module you no longer have the original source file lines, but the concatenated 'logical' lines.
no. The analysis is not based on a imported module but either on a ast
representation or on the raw file. Line lenght check is done on the raw
file, i.e. on 'physical' line
> This is currently not a problem for us, because before the pyLint run, we do our own checks based on the source file which include besides the linelength check also checks for invalid CR/LF sequences and invalid characters.
> Invalid CR/LF sequences lead to pyLint aborts...
could you send me a test file which is correctly importable but which
make pylint aborting ?
> 2. Concerning comment lines in config files:
> How do you process these config files?
> Do you use the Python ConfigParser?
yes (actually a higher level module built on top of both ConfigParser
and optparse).
regards
PS: I'm ccing python-projects mailing list since pylint discussion
should take place there.
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
