pylint/extensions/mccabe.py
def visit_module(self, node):
        """visit an astroid.Module node to check too complex rating and
        add message if is greather than max_complexity stored from options"""
        visitor = PathGraphingAstVisitor()
        for child in node.body:
            visitor.preorder(child, visitor)
        for graph in visitor.graphs.values():
            complexity = graph.complexity()
            node = graph.root
            if hasattr(node, "name"):
                node_name = "'%s'" % node.name
            else:
                node_name = "This '%s'" % node.__class__.__name__.lower()
            if complexity <= self.config.max_complexity:
                continue
            self.add_message(
                "too-complex", node=node, confidence=HIGH, args=(node_name, complexity)
            )
def visit_module(self, node):
        """visit an astroid.Module node to check too complex rating and
        add message if is greather than max_complexity stored from options"""
        visitor = PathGraphingAstVisitor()
        for child in node.body:
            visitor.preorder(child, visitor)
        for graph in visitor.graphs.values():
            complexity = graph.complexity()
            node = graph.root
            if hasattr(node, "name"):
                node_name = "'%s'" % node.name
            else:
                node_name = "This '%s'" % node.__class__.__name__.lower()
            if complexity <= self.config.max_complexity:
                continue
            self.add_message(
                "too-complex", node=node, confidence=HIGH, args=(node_name, complexity)
            )
def visit_module ( self , node ) : visitor = PathGraphingAstVisitor ( ) for child in node . body : visitor . preorder ( child , visitor ) for graph in visitor . graphs . values ( ) : complexity = graph . complexity ( ) node = graph . root if hasattr ( node , "name" ) : node_name = "'%s'" % node . name else : node_name = "This '%s'" % node . __class__ . __name__ . lower ( ) if complexity <= self . config . max_complexity : continue self . add_message ( "too-complex" , node = node , confidence = HIGH , args = ( node_name , complexity ) )
visit an astroid.Module node to check too complex rating and
        add message if is greather than max_complexity stored from options
visit an astroid . Module node to check too complex rating and add message if is greather than max_complexity stored from options