[Python-projects] Can pylint be informed that a method is called byAClass.__init__ () ?

Meding, Olaf Olaf.Meding at bruker-axs.com
Wed May 17 20:48:58 CEST 2006


Yes this would be a nice feature to have.  I also often use methods to initialize instance attributes to keep the __init__() method itself manageable.

Olaf

-----Original Message-----
From: python-projects-bounces at lists.logilab.org
[mailto:python-projects-bounces at lists.logilab.org]On Behalf Of
Pierre_Rouleau at ImpathNetworks.com
Sent: Wednesday, May 17, 2006 1:40 PM
To: python-projects at logilab.org
Subject: [Python-projects] Can pylint be informed that a method is
called byAClass.__init__ () ?


Bonjour à tous,

Pylint (the latest, and previus) generates a W0201 warning when a instance
attribute is created outside of the class __init__() method even if that method
is called from __init__().

I do not want to disable that warning in that particular case.

Is there a way I can tell Pylint that method xxxx() is called from __init__() so
it should not complain that xxxx() creates instance attributes?  There are cases
where it is nice to have one or several methods that create instance attributes
to clarify the source.

Thanks!

Pierre Rouleau.


_______________________________________________
Python-Projects mailing list
Python-Projects at lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects


More information about the Python-Projects mailing list