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 08:38
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...
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.
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...
2. Concerning comment lines in config files:
How do you process these config files?
Do you use the Python ConfigParser?
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: Montag, 3. Januar 2005 18:25
An: Kring Gerhard
Cc: 'Python-Projects@lists.logilab.org'; Lubowiecka Sylwia
Betreff: Re: [Python-projects] WG: pyLint problems with inheritance
> > -----Ursprüngliche Nachricht-----
> > Von: Kring Gerhard
> > Gesendet: Montag, 8. November 2004 15:18
> > An: 'python-projects@logilab.org'
> > Betreff: pyLint
> >
> > Dear pyLint developers,
> > we did some first testing with your tool.
> > It has given us some good hints, how to improve our software.
cool, I hope you'll soon be a pylint addict ;)
> > We have found the following problems
> > - Inheritance is not fully suported.
> > I have stripped down our example code(see zip file) to the essential lines and got the output shown in the lint.txt file in the same .zip file
> > > <<modules.zip>>
> > The lint_sessionagent.py defines a class which inherits from a class defined in lint_agent.
> > lint seems not to support this, because it generates the error message
> > F0001: 0: Unable to load module testagent.lint_sessionagent ('module' object has no attribute 'lint_agent')
the problem is not really inheritance support but module
location/import. This part of the code is currently a moving target
since I put a lot of effort to avoid importing any analyzed module.
Now I don't have this error with your test code, but I've another, so
I'll try to work on your sample to have it working correctly in the next
release.
> > - W0301: Line too long
> > does not really help because the line length calculation is not based on the Source file.
> > e.g. long doc strings or lines continued via \ at the end of a line are reported here, although the physical lines defining these are <80 characters
that's strange, I don't have this problem on my linux machine. Seems to
be windows specific. I'll try to test this on a windows machine before
the next release too.
> > - Generation of configuration file on windows:
> > If the configuration file is being generated on Window systems using the --generate-rcfile option, the configuration file is written to stdout.
is ita problem ?
> > The configuration file generated via this option shows the following problems:
> > - for some options the comments have to be deleted to make them work
hum, I don't understand what do you mean here... Would you have an
example ?
> > - the option --disable-msg is not being transferred to the configuration file
> >
> > I have attached an example file being generated with the following Commandline Arguments:
> > python %TOOLDIR%\lint.py seetestutils --module-rgx=[a-z][a-zA-Z0-9]+$ --disable-msg=W0103 --include-ids=y --variable-rgx=[a-z][a-zA-Z0-9]*$
> > --argument-rgx=[a-z][a-zA-Z0-9]*$ --class-rgx=[A-Z][a-zA-Z0-9]*$ --method-rgx=[_]{0,2}[a-z][a-zA-Z0-9]*[_]{0,2}$ --function-rgx=[a-z][a-zA-Z0-9]*$
> > --generate-rcfile>lint.txt
ok, I've fixed this problem. BTW, the fact that you give the argument
(seetestutils) before the options doesn't cause you any problems ? (it
does on my linux box, and I thought it was a getopt/optparse
limitation).
Thanks for your feedback, regards
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
