mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 10:46:54 +00:00
Ignore .tox directories by default
This commit is contained in:
parent
ac7301c737
commit
762bb68968
1 changed files with 4 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue