third_party.pylibs.pylint.src/test/input/func_w0612.py
Sylvain Thénault c75fa2107b test and fix W0612 false positive
--HG--
branch : astng2
2009-03-18 11:20:03 +01:00

23 lines
441 B
Python

"""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