Make it clear that Flake8Command is currently broken

This commit is contained in:
Florent Xicluna 2013-02-13 17:16:28 +01:00
parent 8a50be88b3
commit 844c951154
2 changed files with 3 additions and 18 deletions

View file

@ -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

View file

@ -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,),