[Python-projects] Check imported modules attributes
amaury.forgeotdarc at ubitrade.com
amaury.forgeotdarc at ubitrade.com
Mon Jun 20 20:02:15 CEST 2005
> > - 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.
> > - 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.
> > - 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!
--
Amaury Forgeot d'Arc
Ubix Development
www.ubitrade.com
More information about the Python-Projects
mailing list