diff options
| author | Sébastien CHAZALLET <s.chazallet@gmail.com> | 2013-03-29 10:43:32 +0100 |
|---|---|---|
| committer | Sébastien CHAZALLET <s.chazallet@gmail.com> | 2013-03-29 10:43:32 +0100 |
| commit | 6f15c265cf7a080978796ab33b6875d7e7ed1e7b (patch) | |
| tree | 077c5357be85c84f3832dd7fbd4be001da6b22a8 /flake8 | |
| parent | 1acc0509abfb41fe00556f6e258b4b84208cb215 (diff) | |
| download | flake8-6f15c265cf7a080978796ab33b6875d7e7ed1e7b.tar.gz | |
check_code works now as check_file
Diffstat (limited to 'flake8')
| -rw-r--r-- | flake8/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): |
