From 25c4f52afacd934eddb642f8df738eea3b14f575 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Thu, 9 Oct 2014 14:09:35 -0500 Subject: [PATCH] Fix GitLab #3 by actually excluding .tox This preserves backwards compatibility in the event someone was using EXTRA_IGNORE as it should have been used --- flake8/engine.py | 5 +++++ flake8/main.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/flake8/engine.py b/flake8/engine.py index 8676cb2..f21e804 100644 --- a/flake8/engine.py +++ b/flake8/engine.py @@ -10,6 +10,8 @@ from flake8.util import OrderedSet, is_windows, is_using_stdin _flake8_noqa = re.compile(r'flake8[:=]\s*noqa', re.I).search +EXTRA_EXCLUDE = '.tox' + def _register_extensions(): """Register all the extensions.""" @@ -89,6 +91,9 @@ def get_style_guide(**kwargs): kwargs['parser'], options_hooks = get_parser() styleguide = StyleGuide(**kwargs) options = styleguide.options + # Add pattersn in EXTRA_EXCLUDE to the list of excluded patterns + options.exclude.extend(pep8.normalize_paths(EXTRA_EXCLUDE)) + for options_hook in options_hooks: options_hook(options) diff --git a/flake8/main.py b/flake8/main.py index d09535c..3b6d30c 100644 --- a/flake8/main.py +++ b/flake8/main.py @@ -15,7 +15,7 @@ else: 'flake8' ) -EXTRA_IGNORE = ['.tox'] +EXTRA_IGNORE = [] def main():