from
Sylvain Thenault <syt at logilab dot fr>
subject
Re: [Python-projects] Check imported modules attributes
date
On Monday 20 June à 20:02, amaury.forgeotdarc@ubitrade.com wrote:2005/06/21 10:19
>
> > > - Remove "Line too long" warning for multiline strings.
> > > It's really a noise for docstrings, and is almost the only
> > > message when you run PyLint over itself. ;-)
> >
> > Hum, I personnaly prefer keeping it as it is. On good days, I
> > even try > to wrap docstrings to 72 chars
> > (and 80 for code and comments).
>
> Oh, I see the problem.
> I'm just parsing a file with Unix end-of-lines on a Windows
> machine. (PyLint's own code, if you want to know)
> The checks use os.linesep="\r\n" to split lines ending
> with "\n". Hence the messages.
gasp. This sounds like a bug...
> > > - False E0203 (Access to member before its definition) when
> > > a lambda is used. There was a very similar recent post two weeks
> > > ago, but it was about local variables. The warning still shows
> > > for class members.
> >
> > Could you post a sample code for the false positive you detected ? I've
> > fixed many of them (including some related to lambda) but some may still
> > be missing.
>
> I will try to come with good test cases.
thanks
> > > - KeyboardInterrupts are often ignored. I saw that there
> > > are some places with bare "except Exception:". They are
> > > reported by PyLint itself! ;-) Should we correct them?
> >
> > well, maybe adding a special case for KeyboardInterrupt would be worth
> > it. In some places I had have to add those bare excepts to avoid crashes
> > which are worse than a warning...
>
> I was actually suggesting changes similar to the following:
> [ in logilab.common.astng.astng, in resolve(), line 249 ]
> try:
> return ASTNGManager().astng_from_module_name(modname)
> except KeyboardInterrupt:
> raise
> except:
> pass
> KeyboardInterrupt is really about a crash wanted by the user!
yep. I've just checked in your suggestion to the cvs.
Thanks !
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects
