mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-11 23:34:17 +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):
|
def check_code(code, ignore=(), complexity=-1):
|
||||||
warning = flakey.check(code, '<stdin>')
|
warning = flakey.check(code, '<stdin>')
|
||||||
warnings = flakey.print_messages(warning, ignore=ignore, code=code)
|
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:
|
if complexity > -1:
|
||||||
warnings += mccabe.get_code_complexity(code, complexity)
|
warnings += mccabe.get_code_complexity(code, complexity)
|
||||||
return warnings
|
return warnings
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue