[Python-projects] Pylint fails to understand inheritance

Osmo Salomaa otsaloma at cc.hut.fi
Fri Nov 3 01:08:21 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



More information about the Python-Projects mailing list