mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-13 08:04:18 +00:00
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
This commit is contained in:
parent
752790e4ea
commit
25c4f52afa
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
_flake8_noqa = re.compile(r'flake8[:=]\s*noqa', re.I).search
|
||||||
|
|
||||||
|
EXTRA_EXCLUDE = '.tox'
|
||||||
|
|
||||||
|
|
||||||
def _register_extensions():
|
def _register_extensions():
|
||||||
"""Register all the extensions."""
|
"""Register all the extensions."""
|
||||||
|
|
@ -89,6 +91,9 @@ def get_style_guide(**kwargs):
|
||||||
kwargs['parser'], options_hooks = get_parser()
|
kwargs['parser'], options_hooks = get_parser()
|
||||||
styleguide = StyleGuide(**kwargs)
|
styleguide = StyleGuide(**kwargs)
|
||||||
options = styleguide.options
|
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:
|
for options_hook in options_hooks:
|
||||||
options_hook(options)
|
options_hook(options)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ else:
|
||||||
'flake8'
|
'flake8'
|
||||||
)
|
)
|
||||||
|
|
||||||
EXTRA_IGNORE = ['.tox']
|
EXTRA_IGNORE = []
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue