mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-29 18:46:52 +00:00
Fix the get_*_complexity functions
This commit is contained in:
parent
1c6ed0526a
commit
321bbce17f
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue