from
Sylvain Thenault <syt at logilab dot fr>
subject
Re: [Python-projects] Check imported modules attributes
date
Hey !2005/06/20 17:15
On Monday 20 June à 16:34, amaury.forgeotdarc@ubitrade.com wrote:
> Actually I have many other needs and ideas that I would
> like to have in PyLint.
Cool :)
> Here are some of them, in random order:
>
> - pylint.bat does not work at all. Since the .bat is also a
> python script, the call to python should at least repeat the
> %0 parameter. Attached is a working version.
> (I know most of you only work on Linux...)
> (See attached file: pylint.bat)
Great. I almost *never* work or whatever else on a windows box, as
most people here at Logilab. So let say I let Windows+Pylint people
maintain the .bat file, I'll blindly include it in the distribution.
> - 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).
> Also are "continued statements" (with \) to be considered as
> long lines?
I don't think so. Some times you really need a line longer than 80
chars, and in this case \ is your friend.
> - A way to customize W0201 (Attribute defined outside __init__)
> Currently, '__init__' means one of __init__, __new__ or
> setUp. I suppose that setUp is handy for unit tests, but I would
> like to add mine...
> How about a configuration option?
There is already one in the cvs :)
> - About "Too many public methods", maybe make the distinction
> between functions declared in the class, and functions inherited
> from base classes.
Yes, I also intend to do something about this one, but I've no clear
rule in mind now, so I'm just waiting to have some time to think a litle
bit about it (or to get a proposition which makes sense to me :)
> - 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.
> - "Unused imports" reports too many things. I think that
> is because I use "import *" on a package that already
> "import *" its submodules. I know I should not write code
> like this, but hey, that's another warning...
maybe just disabling this warning for offending modules is enough ?
> - 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 can help implementing many of these, but I guess
> some points need further discussion.
Any help / patches / ideas are welcome ! :o)
> Is there a better place to express such ideas?
no, it's the right place.
> What is the best way to send patches?
> Is there a public issues tracker?
> Is a "development release" available? (a daily snapshot
> would be great)
We've not yet taken the time to provide an infrastructure to ease
external contributions to our free software projects. We think about it
for a long time now, but the time is missing and we don't have so much
contributions, so... However we are really happy with contribs such as
yours and as we wish to get more like this, we'll probably take the
time at some point :) Make the bugs/features tracker publicly available
and publishing daily cvs snapshots would be a good start, for sure...
But in the mean time, this mailing list is the not perfect but right
right place to talk about pylint development and to send patchs !
Cheers,
--
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
