] > [Python-projects] Re: PyLint problems with qt (Logilab.org)

Email [Python-projects] Re: PyLint problems with qt

from
to
subject
[Python-projects] Re: PyLint problems with qt
date
2005/01/27 16:47
On Thursday 27 January à 12:41, Fabio Zadrozny wrote:
> Hi Sylvain,

Hey Fabio,

long time you didn't recorded a pylint bug :)
 
> The code below is giving the error:
> ID:W0221 ToElapse.timerEvent: Arguments number differs from overriden method

> But it shouldn't, as the timerEvent signature is correct ( virtual void
> timerEvent ( QTimerEvent * ) )
> And I couldn't make it work with less or more arguments.

> import qt

> class ToElapse(qt.QObject):

>     def __init__(self):
>         qt.QObject.__init__(self)
>         
>     def timerEvent(self, event):
>         pass 

ok, the problem was that with builtin methods, the astng builder is 
unable to get arguments information, but the released code set argnames
(the attribute listing function/method arguments) to an empty list
instead of None (which informs that we have no arguments information,
not no arguments). That's why pylint was complaining...
Attached a fixed builder correcting this problem, still replacing the
logilab/common/astng/builder.py file.

regards
-- 
Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org


attachment
is a reply to
has reply