diff options
author | David Cramer <dcramer@gmail.com> | 2018-03-29 10:31:26 -0700 |
---|---|---|
committer | Ashley Camba <ashwoods@gmail.com> | 2018-03-29 19:31:26 +0200 |
commit | 083a984776f750b1eb9f902f1fdf9bfdee8526e3 (patch) | |
tree | 8652f05e6b8ff790dc49e9aa894ca68320e47248 | |
parent | dad68e86a6008588a6094af011c225a69fc98ee4 (diff) | |
download | raven-083a984776f750b1eb9f902f1fdf9bfdee8526e3.tar.gz |
fix: Correct flake8 usage on pre-commit hook (#1217)
rant: If anyone breaks this again I will strip your commit access.
-rwxr-xr-x | hooks/pre-commit.flake8 | 5 | ||||
-rwxr-xr-x | setup.py | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/hooks/pre-commit.flake8 b/hooks/pre-commit.flake8 index 7abe558..ac826cc 100755 --- a/hooks/pre-commit.flake8 +++ b/hooks/pre-commit.flake8 @@ -17,7 +17,6 @@ if 'VIRTUAL_ENV' in os.environ: def main(): - from flake8.main import USER_CONFIG from flake8.engine import get_style_guide from flake8.hooks import run @@ -37,10 +36,10 @@ def main(): lambda x: x.endswith('.py') and os.path.exists(x), files_modified) - flake8_style = get_style_guide(parse_argv=True, config_file=USER_CONFIG) + flake8_style = get_style_guide(parse_argv=True) report = flake8_style.check_files(files_modified) - return report.total_errors + return report.total_errors != 0 if __name__ == '__main__': sys.exit(main()) @@ -73,7 +73,7 @@ tests_require = [ 'pytest-pythonpath==0.7.1', 'pytest-sugar==0.9.0', 'pytest-cov', - 'pytest-flake8==0.9.1', + 'pytest-flake8==1.0.0', 'requests', 'tornado>=4.1,<5.0', 'tox', |