summaryrefslogtreecommitdiff
path: root/test/input/func_w0612.py
blob: e37567104c08c84f0e5453c3e8b820ea14053c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""test unused variable
"""

__revision__ = 0

def function(matches):
    """"yo"""
    aaaa = 1
    index = -1
    for match in matches:
        index += 1
        print match

def visit_if(self, node):
    """increments the branchs counter"""
    branchs = 1
    # don't double count If nodes coming from some 'elif'
    if node.orelse and len(node.orelse) > 1:
        branchs += 1
    self.inc_branch(branchs)
    self.stmts += branchs