Fix black pre-commit hook (#14212)

This commit is contained in:
John Westcott IV 2023-07-06 16:36:50 -04:00 committed by GitHub
parent 8b49f910c7
commit cb5a8aa194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
if [ -z $AWX_IGNORE_BLACK ] ; then
python_files_changed=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.py')
python_files_changed=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.py$')
if [ "x$python_files_changed" != "x" ] ; then
black --check $python_files_changed || \
if [ $? != 0 ] ; then