] > Re: [Python-projects] pylint: Errors with supposedly undefined methods (Logilab.org)

Email Re: [Python-projects] pylint: Errors with supposedly undefined methods

from
subject
Re: [Python-projects] pylint: Errors with supposedly undefined methods
date
2005/09/12 11:13
On Thursday 01 September à 01:56, Jan Niklas Fingerle wrote:
> Hi,

Hi,
 
> hope this hasn't been mentioned before, I'm quite
> new to the list...

hum, no, your case is actually a bit hairy :)
 
> Pylint is a great piece of software, yet I've got
> problems when pylinting:

> --------------------8<----------------------------
> """Backend Base Classes for the schwelm user DB"""

> __revision__ = "alpha"

> class Aaa(object):
>     """docstring"""
>     def __init__(self):
>         self.__setattr__('a','b')
>         pass

>     def one_public(self):
>         """docstring"""
>         pass

>     def another_public(self):
>         """docstring"""
>         pass

> class Bbb(Aaa):
>     """docstring"""
>     pass



> class Ccc(Aaa):
>     """docstring"""

>     class Ddd(Aaa):
>         """docstring"""
>         pass

>     class Eee(Ddd):
>         """docstring"""
>         pass
> -------------------->8----------------------------

> (Sorry, the test case got cluttered by some stuff
> to suppress other messages in the default config...)

> I get the following (on Debian, pylint 0.7 from
> Debian testing):

> --------------------8<----------------------------
> $ pylint.python2.4 --reports=n pylinttest
> No config file found, using default configuration
> ************* Module pylinttest
> E:  9:Aaa.__init__: Access to undefined member '__setattr__'
> W: 33:Ccc.Eee: Class has no __init__ method
> R: 33:Ccc.Eee: Not enough public methods (0/2)
> $
> -------------------->8----------------------------

> __setattr__ seems quite defined to me and the undefined
> __init__-method and public methods seem to be only a
> problem when subclassing a class that's local to another
> class.

true, I'll try to find the time to investigate this before the next
release. Thanks for the report !

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

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

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects