342 complexityChecker.run() |
342 complexityChecker.run() |
343 stats.update(complexityChecker.counters) |
343 stats.update(complexityChecker.counters) |
344 errors += complexityChecker.errors |
344 errors += complexityChecker.errors |
345 |
345 |
346 # check function annotations |
346 # check function annotations |
347 # TODO: implement function annotation checker (see flake8-annotations) |
347 if sys.version_info >= (3, 5, 0): |
|
348 # annotations are supported from Python 3.5 on |
|
349 from AnnotationsChecker import AnnotationsChecker |
|
350 annotationsChecker = AnnotationsChecker( |
|
351 source, filename, select, ignore, [], repeatMessages) |
|
352 annotationsChecker.run() |
|
353 stats.update(annotationsChecker.counters) |
|
354 errors += annotationsChecker.errors |
348 |
355 |
349 errorsDict = {} |
356 errorsDict = {} |
350 for _fname, lineno, position, text in errors: |
357 for _fname, lineno, position, text in errors: |
351 if lineno > len(source): |
358 if lineno > len(source): |
352 lineno = len(source) |
359 lineno = len(source) |