[Python-projects] Pylint fails to understand inheritance

Osmo Salomaa otsaloma at cc.hut.fi
Fri Nov 10 00:04:00 CET 2006


Hello,

I'm using pylint 0.12.1, python 2.5 and pygtk 2.10. When checking any
gtk widget code, pylint fails to understand inheritance thinking that
the widget inherits from logilab.astng.Yes.

Here's a minimal gtk widget with two valid method calls:

import gtk
class View(gtk.TreeView):
    def __init__(self, model=None):
        gtk.TreeView.__init__(self, model)
        self.set_headers_visible(True)
        self.set_rules_hint(True)

Here are the error messages from pylint (with default configuration):

C:  1: Missing docstring
C:  2:View: Missing docstring
W:  4:View.__init__: __init__ method from a non direct base class
<logilab.astng.Yes object at 0xb7b66e2c> is called
E:  5:View.__init__: Instance of 'View' has no 'set_headers_visible'
member
E:  6:View.__init__: Instance of 'View' has no 'set_rules_hint' member
R:  2:View: To few public methods (0/2)

-- 
Osmo Salomaa

P.S. I sent this mail as a non-member already a week ago, but nothing
happened with that mail. Feel free to delete the one in the moderation
queue if it's still there.

P.P.S. The new logilab website is quite difficult. There's a bug tracker
for pylint with no ability to post a new bug, incomplete archives for
python-projects list and no link to [1] which I assume contains the full
archives.

[1] http://lists.logilab.org/pipermail/python-projects/



More information about the Python-Projects mailing list