blob: 24393c790b0b0eb5ab49e5cac9e7290bc7b6196c (
plain)
1
2
3
4
5
6
7
8
|
#!/usr/bin/bash
if [ -z $AWX_IGNORE_BLACK ]
then
black --check $(git diff --cached --name-only --diff-filter=AM | grep -E '\.py') || \
(echo 'To fix this, run `make black` to auto-format your code prior to commit, or set AWX_IGNORE_BLACK=1' && \
exit 1)
fi
|