diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2013-10-05 08:26:15 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2013-10-05 08:26:15 -0500 |
| commit | 762bb689686e230c381c2d12a06bb91a9c466124 (patch) | |
| tree | 9d22a9bcf95fe7025b421a1e7e94b1609dc6b589 | |
| parent | ac7301c7375f42d6fb52741980159eb46a7b4810 (diff) | |
| download | flake8-762bb689686e230c381c2d12a06bb91a9c466124.tar.gz | |
Ignore `.tox` directories by default
| -rw-r--r-- | flake8/main.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/flake8/main.py b/flake8/main.py index 7e5c35f..2a8e484 100644 --- a/flake8/main.py +++ b/flake8/main.py @@ -15,6 +15,8 @@ else: 'flake8' ) +EXTRA_IGNORE = ['.tox'] + def main(): """Parse options and run checks on Python source.""" @@ -56,6 +58,7 @@ def check_file(path, ignore=(), complexity=-1): :param tuple ignore: (optional), error and warning codes to be ignored :param int complexity: (optional), enables the mccabe check for values > 0 """ + ignore = set(ignore).union(EXTRA_IGNORE) flake8_style = get_style_guide( config_file=DEFAULT_CONFIG, ignore=ignore, max_complexity=complexity) return flake8_style.input_file(path) @@ -68,6 +71,7 @@ def check_code(code, ignore=(), complexity=-1): :param tuple ignore: (optional), error and warning codes to be ignored :param int complexity: (optional), enables the mccabe check for values > 0 """ + ignore = set(ignore).union(EXTRA_IGNORE) flake8_style = get_style_guide( config_file=DEFAULT_CONFIG, ignore=ignore, max_complexity=complexity) return flake8_style.input_file(None, lines=code.splitlines(True)) |
