Fix the get_*_complexity functions

This commit is contained in:
Florent Xicluna 2013-02-13 19:53:01 +01:00
parent 1c6ed0526a
commit 321bbce17f

View file

@ -262,7 +262,7 @@ def get_code_complexity(code, min_complexity=7, filename='stdin'):
complx = []
McCabeChecker.max_complexity = min_complexity
for lineno, offset, text, check in McCabeChecker(tree, filename):
for lineno, offset, text, check in McCabeChecker(tree, filename).run():
complx.append('%s:%d:1: %s' % (filename, lineno, text))
if len(complx) == 0: