pylint/checkers/design_analysis.py
def visit_if(self, node):
        """increments the branches counter and checks boolean expressions"""
        self._check_boolean_expressions(node)
        branches = 1
        # don't double count If nodes coming from some 'elif'
        if node.orelse and (len(node.orelse) > 1 or not isinstance(node.orelse[0], If)):
            branches += 1
        self._inc_branch(node, branches)
        self._inc_all_stmts(branches)
def visit_if(self, node):
        self._check_boolean_expressions(node)
        branches = 1
        # don't double count If nodes coming from some 'elif'
        if node.orelse and (len(node.orelse) > 1 or not isinstance(node.orelse[0], If)):
            branches += 1
        self._inc_branch(node, branches)
        self._inc_all_stmts(branches)
def visit_if ( self , node ) : self . _check_boolean_expressions ( node ) branches = 1 # don't double count If nodes coming from some 'elif' if node . orelse and ( len ( node . orelse ) > 1 or not isinstance ( node . orelse [ 0 ] , If ) ) : branches += 1 self . _inc_branch ( node , branches ) self . _inc_all_stmts ( branches )
increments the branches counter and checks boolean expressions
increments the branches counter and checks boolean expressions