From 6f15c265cf7a080978796ab33b6875d7e7ed1e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20CHAZALLET?= Date: Fri, 29 Mar 2013 10:43:32 +0100 Subject: [PATCH] check_code works now as check_file --- flake8/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flake8/main.py b/flake8/main.py index 8054f21..1ea0e73 100644 --- a/flake8/main.py +++ b/flake8/main.py @@ -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):