from
Nicolas Chauvat <nico at logilab dot fr>
to
Fabio Zadrozny <fabioz at esss dot com dot br>
cc
Sylvain Thenault <syt at logilab dot fr>
subject
Re: [Python-projects] Bug in pylint (when using --disable-msg)
date
Hello,2005/02/26 01:03
On Thu, Feb 24, 2005 at 03:44:25PM -0300, Fabio Zadrozny wrote:
> I just upgraded to pylint 0.6.3 (commons 0.9.2) and running it against a
> simple file I get the error below:
>
> Note that if I don't put the
> --disable-msg=W0103,W0131,C0103,W0312,W0511,W0232 option, it runs
> without any problems!
Typical regression bug... trying to fix a a former problem this one
was introduced and there was no test catching it.
> File ....\logilab\pylint\lint.py", line 283, in set_option
> for _id in get_csv(value):
That "value" thing is returned by optparse and optparse knows that it is supposed to
be csv, so optparse returns a list, hence there is no need to pass it thru get_csv.
Replacing the above line with
for _id in value :
could work, but a former message says it breaks when using a single arg to the
option: see http://lists.logilab.org/pipermail/python-projects/2005-February/000249.html
[thinking...]
I'm afraid we'll have to write specific cases here as in :
if isinstance(value, list) :
for _id in value :
meth(_id)
else :
meth(value)
please confirm that the above works for you as it works for me and I will add
test cases and a fix to our CVS.
Thanks for the report.
--
Nicolas Chauvat
logilab.fr - services en informatique avancée et gestion de connaissances
