[Python-projects] is there a way to tell pylint about dynamic attributes?

Alexandre Fayolle alexandre.fayolle at logilab.fr
Fri Jan 9 17:54:07 CET 2009


Le Wednesday 07 January 2009 19:40:31 Paul Warner, vous avez écrit :
> I have some python classes which dynamically add attributes in the
> __init__ method, and it seems like pylint doesn't see them at all.  Is
> there some way to tell pylint about these attributes?  Other than
> re-writing the code to have a simple self.attr = value syntax?

Hi,

The short answer is (unfortunately) "no". 

A longer and more interesting answer would be asking you how you would like to 
tell pylint the list of valid attributes for your class?

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part.
Url : http://lists.logilab.org/pipermail/python-projects/attachments/20090109/e1aea53c/attachment.pgp 


More information about the Python-Projects mailing list