On Wednesday 30 November 2011 20:05:38 Simon Schampijer wrote: > Hi, > > I tired to run pylint* over code that is using gobject-introspection like: > > from gi.repository import Gtk > button = Gtk.Button() > > Pylint does not seem to recognize this: > > E: 1: No name 'Gtk' in module 'gi.repository' > > I googled and grep'ed a bit around and it does not seem to have been > came up so far. Is this not supported at present? Are there any plans > to do so?
Hello Simon, The short answer is "no it is not supported". Pylint is not very good with dynamic code since it tries very hard not to import the modules it checks, which means it does not see the results of code executed at import time. Same thing for classical Python introspection constructs (getattr/setattr, __dict__ manipulation, etc.) Recent development make it easier to help pylint grasp these. See http://www.logilab.org/blogentry/78354 for instance. We at Logilab don't use gobject, so there is little chance we will get the itch leading us to write such a plugin for gobject. On the other hand, we will be very happy to integrate or point to any plugin provided and maintained by other (hint, hint), and of course we will provide support in the writing of such a plugin. -- Alexandre Fayolle LOGILAB, Paris (France) Formations Python, CubicWeb, Debian : http://www.logilab.fr/formations Développement logiciel sur mesure : http://www.logilab.fr/services Informatique scientifique: http://www.logilab.fr/science _______________________________________________ Python-Projects mailing list [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
