Ignore .tox directories by default

This commit is contained in:
Ian Cordasco 2013-10-05 08:26:15 -05:00
parent ac7301c737
commit 762bb68968

View file

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