mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 02:46:52 +00:00
check_code works now as check_file
This commit is contained in:
parent
1acc0509ab
commit
6f15c265cf
1 changed files with 2 additions and 1 deletions
|
|
@ -63,7 +63,8 @@ def check_code(code, ignore=(), complexity=-1):
|
|||
"""
|
||||
flake8_style = get_style_guide(
|
||||
config_file=DEFAULT_CONFIG, ignore=ignore, max_complexity=complexity)
|
||||
return flake8_style.input_file('-', lines=code.splitlines())
|
||||
return flake8_style.input_file(
|
||||
None, lines=['%s\n' % l for l in code.splitlines()])
|
||||
|
||||
|
||||
class Flake8Command(setuptools.Command):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue