mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 12:36:54 +00:00
Make it clear that Flake8Command is currently broken
This commit is contained in:
parent
8a50be88b3
commit
844c951154
2 changed files with 3 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue