[Python-projects] W0104 False positive (function_call() and other_function_call())
Sylvain Thénault
sylvain.thenault at logilab.fr
Tue Jan 13 19:24:59 CET 2009
Le Monday 12 January 2009 20:49:07 Duncan Findlay, vous avez écrit :
> Hi all,
Hi,
> 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
Thanks,
--
Sylvain Thénault LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
Python et calcul scientifique: http://www.logilab.fr/science
More information about the Python-Projects
mailing list