From d1937c946b1f1ed0675eb7be3356d55a12b22bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20CHAZALLET?= Date: Fri, 29 Mar 2013 11:42:11 +0100 Subject: [PATCH] Simplier correction --- flake8/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flake8/main.py b/flake8/main.py index 1ea0e73..d9b9515 100644 --- a/flake8/main.py +++ b/flake8/main.py @@ -63,8 +63,7 @@ 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( - None, lines=['%s\n' % l for l in code.splitlines()]) + return flake8_style.input_file(None, lines=code.splitlines(True)) class Flake8Command(setuptools.Command):