[Python-projects] Too many instance attributes question

Meding, Olaf Olaf.Meding at bruker-axs.com
Wed Apr 26 17:08:58 CEST 2006


I would prefer to disable the "Too many instance attributes" only for certain classes (not for all classes in a file).

The # pylint: disable-msg=R0902 (see below) below does not seem to be working inside a class (though it works if at the top of the file).  Is this intentional?

class test:
    def __init__(self):
        # Turn off PyLint message:
        #   '[R0902, test] Too many instance attributes (8/7)'
        # pylint: disable-msg=R0902		
        self.v1 = 1
        self.v2 = 2
        self.v3 = 3
        self.v4 = 4
        self.v5 = 5
        self.v6 = 6
        self.v7 = 7
        self.v8 = 8


Olaf	



More information about the Python-Projects mailing list