mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 10:46:54 +00:00
parent
264bc0370a
commit
e9366a904e
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ def check_file(path, ignore=(), complexity=-1):
|
|||
def check_code(code, ignore=(), complexity=-1):
|
||||
warning = flakey.check(code, '<stdin>')
|
||||
warnings = flakey.print_messages(warning, ignore=ignore, code=code)
|
||||
warnings += pep8style.input_file(None, lines=code.split('\n'))
|
||||
warnings += pep8style.input_file('-', lines=code.split('\n'))
|
||||
if complexity > -1:
|
||||
warnings += mccabe.get_code_complexity(code, complexity)
|
||||
return warnings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue