[IPOL discuss] pylint error using input_select and params
Nicolas Limare
nicolas.limare at cmla.ens-cachan.fr
Thu Apr 17 06:35:05 CEST 2014
>>Just a small question about an pylint error that I obtain even if the
>>demo is fine:
>>pylint app/74/app.py --disable=C0103 --rcfile utils/pylintrc
>>app.input_select: Passing unexpected keyword argument 'key' in
>>function call
>
>If the base_app.py, the signature for function params(...) is the
>following:
> def params(self, newrun=False, msg=None)
>
>BUT, in input_select, a "key" parameter is passed: return
>self.params(msg=msg, key=self.key) (this causes the warning)
>and also in input_upload: return self.params(msg=msg, key=self.key)
In fact this "key" parameter is used and removed by the "init_app"
decorator which receives the calls (with key) before pasing them to
the real params() function (without key). So my understanding is that
pylint does not handle the function signature changes by a decorator,
and it seems confirmed by a message on the pylint mailing-list:
-> http://lists.logilab.org/pipermail/python-projects/2013-January/003399.html
--
Nicolas LIMARE
http://nicolas.limare.net/ pgp:0xFA423F4F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://tools.ipol.im/mailman/archive/discuss/attachments/20140417/b747e0fe/attachment.pgp>
More information about the discuss
mailing list