[Python-projects] Pylint fails to understand inheritance

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Nov 16 19:39:17 CET 2006


On Thursday 16 November à 19:58, Osmo Salomaa wrote:
> to, 2006-11-16 kello 18:29 +0100, Sylvain Thénault kirjoitti:
> > if you type "python2.5" and the "import gtk" in the same shell you use
> > to launch pylint, the import work ?
> 
> Yes, the import works.
> 
> > Which pygtk version are you using ?
> > (I've python-gtk2 2.8.6)
> 
> I'm using PyGTK 2.10.1 with Python 2.4 and PyGTK 2.10.3 with Python 2.5.
> Both combinations produce the very same pylint output. I didn't have
> these problems with PyGTK 2.8.x, so it could be something specific to
> (Py)GTK 2.10.

huM. I've already seen similar problem in the past caused by
"__module__" attribute of extension class not correctly positioned,
which make fail ast construction for these extension class. Unfortunatly
there isn't a lot of (not too dirty) things I can do against that. Just
to check, what do you get when you type something similar as :

>>> import gtk
>>> print gtk.Button.__module__
gtk

If you get something else than "gtk", you should probably post a bug on
the pygtk project. Else I'll have to investigate further...

-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Python et calcul scientifique:           http://www.logilab.fr/science



More information about the Python-Projects mailing list