pylint/checkers/design_analysis.py
def visit_classdef(self, node):
        """check size of inheritance hierarchy and number of instance attributes
        """
        nb_parents = len(list(node.ancestors()))
        if nb_parents > self.config.max_parents:
            self.add_message(
                "too-many-ancestors",
                node=node,
                args=(nb_parents, self.config.max_parents),
            )

        if len(node.instance_attrs) > self.config.max_attributes:
            self.add_message(
                "too-many-instance-attributes",
                node=node,
                args=(len(node.instance_attrs), self.config.max_attributes),
            )
def visit_classdef(self, node):
        nb_parents = len(list(node.ancestors()))
        if nb_parents > self.config.max_parents:
            self.add_message(
                "too-many-ancestors",
                node=node,
                args=(nb_parents, self.config.max_parents),
            )

        if len(node.instance_attrs) > self.config.max_attributes:
            self.add_message(
                "too-many-instance-attributes",
                node=node,
                args=(len(node.instance_attrs), self.config.max_attributes),
            )
def visit_classdef ( self , node ) : nb_parents = len ( list ( node . ancestors ( ) ) ) if nb_parents > self . config . max_parents : self . add_message ( "too-many-ancestors" , node = node , args = ( nb_parents , self . config . max_parents ) , ) if len ( node . instance_attrs ) > self . config . max_attributes : self . add_message ( "too-many-instance-attributes" , node = node , args = ( len ( node . instance_attrs ) , self . config . max_attributes ) , )
check size of inheritance hierarchy and number of instance attributes
check size of inheritance hierarchy and number of instance attributes