If strict mode and pre-commit fails, suggest no-verify

This commit is contained in:
Peter Cock 2017-08-07 11:47:34 +01:00
parent 1820afa4a4
commit db4e85f04c

View file

@ -56,7 +56,9 @@ def hook(lazy=False, strict=False):
update_paths(app.file_checker_manager, tempdir) update_paths(app.file_checker_manager, tempdir)
app.report_errors() app.report_errors()
if strict: if strict and app.result_count:
print("flake8 checks failed. Please fix, or force with "
"'git commit --no-verify'")
return app.result_count return app.result_count
return 0 return 0