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

subject
[Python-projects] pylint: Errors with supposedly undefined methods
date
2005/09/01 01:56
Hi,

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

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.

Anyway, I should mention the zillion messages that helped
me to clean up my code... :-)

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