[Python-projects] W0104 False positive (function_call() and other_function_call())
Duncan Findlay
duncf at debian.org
Wed Jan 14 02:10:01 CET 2009
On Jan 13, 2009, at 10:24 AM, Sylvain Thénault wrote:
> Le Monday 12 January 2009 20:49:07 Duncan Findlay, vous avez écrit :
>>
>> I'm working on some new checkers to fit our local Python style
>> guidelines, and I found a false positive with W0104 ("Statement seems
>> to have no effect"). I'm running python 2.5 on mercurial tip.
>>
>> This code exhibits a false positive:
>> some_function() and some_other_function()
>>
>> Granted, it's dirty and shouldn't be done, (I'm adding a message for
>> it in my code...) but it shouldn't lead to a W0104. My guess is that
>> instead of checking that a discard node's expr attribute is a Yield
>> or
>> CallFunc node, we should also check if a child node is one of those.
>
> Huum you're probably right. I've no time for this today so I've
> added this to
> the tracker so we won't forget: http://www.logilab.org/ticket/6951
On a related note, is it possible to file pylint bugs ourselves?
Unless I missed something obvious it seems that's not possible right
now. (Which is surprising -- a public bug tracker seems like it's a
useful thing for any open source project.)
Thanks,
Duncan
More information about the Python-Projects
mailing list