[Python-projects] Pylint fails to understand inheritance

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Nov 16 18:29:12 CET 2006


On Thursday 16 November à 19:21, Osmo Salomaa wrote:
> to, 2006-11-16 kello 10:05 +0100, Sylvain Thénault kirjoitti:
> > You can also notice that there is a non regression test about a
> > similar gtk problem (maybe it was yours originaly) in
> > test/regrtest_data/pygtk_import.py. Does python regrtest.py in pylint's
> > test directory work for you ?
> 
> No.
> 
> $ python2.5 regrtest.py
> ...F.S....
> ======================================================================
> FAIL: test_gtk_import (__main__.NonRegrTC)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python2.5/site-packages/logilab/common/testlib.py", line
> 776, in _proceed
>     testfunc(*args, **kwargs)
>   File "regrtest.py", line 89, in test_gtk_import
>     self.failUnlessEqual(got, '')
> AssertionError: 'W:  7:FooButton: Class has no __init__ method' != ''
> 
> ======================================================================
> SKIPPED: test_numarray_import (__main__.NonRegrTC)
>         test skipped: numarray is not available
> ----------------------------------------------------------------------
> Ran 10 tests in 2.428s
> 
> FAILED (failures=1)
> 
> > hint: if gtk analysis work correctly, there is a little time during the
> > first Convention message and the other, that's the time where the astng
> > representation for gtk is built...
> 
> I do see a noticeable break between the convention messages.

if you type "python2.5" and the "import gtk" in the same shell you use
to launch pylint, the import work ? Which pygtk version are you using ?
(I've python-gtk2 2.8.6)

-- 
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