mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 13:36:54 +00:00
If strict mode and pre-commit fails, suggest no-verify
This commit is contained in:
parent
1820afa4a4
commit
db4e85f04c
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue