[Python-projects] pylint doesn't detect missing number of parameters in class

Emile Anclin emile.anclin at logilab.fr
Wed Mar 11 16:23:47 CET 2009


hello, 

Le Wednesday 11 March 2009 16:12:51 Dotan Barak, vous avez écrit :
> Hi.
>
> I used pylint version 0.16.0 on the following python code that
> contains a bug (wrong number of parameter to the class):
>
> <start>
> """File example"""
>
> class MyClass:
>     """Example"""
>     def __init__(self, param1, param2, param3):
>         self.param1 = param1
>         self.param2 = param2
>         self.param3 = param3
>
>     def print2(self):
>         """Print func"""
>         pass
>
>     def walk(self):
>         """Walk func"""
>         pass
>
> _my_class = MyClass(1, 2)
> <end>
>
> It seems that pylint could not detect this error.
>
> Thanks
> Dotan
> _______________________________________________
> Python-Projects mailing list
> Python-Projects at lists.logilab.org
> http://lists.logilab.org/mailman/listinfo/python-projects

thanks.

it seems similar to the following one : http://www.logilab.org/ticket/5561

I will however add the comment about classes.

-- 

Emile Anclin <emile.anclin at logilab.fr>
http://www.logilab.fr/   http://www.logilab.org/ 
Informatique scientifique & et gestion de connaissances


More information about the Python-Projects mailing list