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