James Lingard wrote:
On Mon, Jan 24, 2011 at 6:14 PM, Sylvain Thénault
<[email protected] <mailto:[email protected]>> wrote:
On 24 janvier 14:57, James Lingard wrote:
> I would like the ability to disable the W0612 warning for
variables created
> as the result of a sequence unpacking operation. For example,
after:
>
> ( a, b, c, d, e ) = mytuple
>
> pylint will currently complain about all the unused variables.
Although I
> could rename the unused variables to something like _b to
indicate they're
> supposed to be unused, I'd rather just ignore all W0612 warnings
in this
> case.
# pylint: disable=W0612
doesn't do the trick?
[snip] You could argue that it's better to have the variables names
there, as documentation for what the other components of the tuple are.
This is a very good point. I switch to pylint style however, because
it's really important to get no warning/errors at all, otherwise you're
good for permanent analysis of your logs.
Your original request make sense though. Don't know how difficult it
would be to implement this in pylint.
JM
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects