From 844c95115450d63413aa14a728c94124f778f4c1 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Wed, 13 Feb 2013 17:16:28 +0100 Subject: [PATCH] Make it clear that Flake8Command is currently broken --- flake8/main.py | 5 +++-- flake8/util.py | 16 ---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/flake8/main.py b/flake8/main.py index 66ee41c..38e712d 100644 --- a/flake8/main.py +++ b/flake8/main.py @@ -5,7 +5,7 @@ import pyflakes.api import pyflakes.checker import select from flake8 import mccabe -from flake8.util import _initpep8, skip_file, get_parser, Flake8Reporter +from flake8.util import skip_file, get_parser, Flake8Reporter pep8style = None @@ -123,7 +123,8 @@ else: yield "%s.py" % filename def run(self): - _initpep8() + # XXX the setuptools command is currently broken + # _initpep8() # _get_python_files can produce the same file several # times, if one of its paths is a parent of another. Keep diff --git a/flake8/util.py b/flake8/util.py index 2dd6a80..23ee811 100644 --- a/flake8/util.py +++ b/flake8/util.py @@ -91,22 +91,6 @@ def skip_file(path, source=None): return _NOQA.search(content) is not None -def _initpep8(config_file=True): - # default pep8 setup - global pep8style - import pep8 - if pep8style is None: - pep8style = pep8.StyleGuide(config_file=config_file) - pep8style.options.physical_checks = pep8.find_checks('physical_line') - pep8style.options.logical_checks = pep8.find_checks('logical_line') - pep8style.options.counters = dict.fromkeys(pep8.BENCHMARK_KEYS, 0) - pep8style.options.messages = {} - if not pep8style.options.max_line_length: - pep8style.options.max_line_length = 79 - pep8style.args = [] - return pep8style - - error_mapping = { 'W402': (messages.UnusedImport,), 'W403': (messages.ImportShadowedByLoopVar,),