From 1a2b5a85934fe719ad39b3207a5bf909ede7d505 Mon Sep 17 00:00:00 2001 From: Deimos Date: Mon, 13 Aug 2018 14:32:25 -0600 Subject: [PATCH] Add Black format check to git hooks --- git_hooks/pre-commit | 1 + git_hooks/pre-push | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit index 1aa452c..5f6c465 100755 --- a/git_hooks/pre-commit +++ b/git_hooks/pre-commit @@ -4,4 +4,5 @@ vagrant ssh -c ". activate \ && echo 'Checking mypy type annotations...' && mypy . \ + && echo 'Checking if Black would reformat any code...' && black --check . \ && echo -n 'Running tests: ' && pytest -q" diff --git a/git_hooks/pre-push b/git_hooks/pre-push index dafcae3..5595417 100755 --- a/git_hooks/pre-push +++ b/git_hooks/pre-push @@ -4,5 +4,6 @@ vagrant ssh -c ". activate \ && echo 'Checking mypy type annotations...' && mypy . \ + && echo 'Checking if Black would reformat any code...' && black --check . \ && echo -n 'Running tests: ' && pytest -q \ - && echo 'Checking code style (takes a while)...' && pylama" + && echo 'Checking code style fully (takes a while)...' && pylama"