From cb5a8aa1942a7d6cdfb67266ce45d1830c29783d Mon Sep 17 00:00:00 2001 From: John Westcott IV <32551173+john-westcott-iv@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:36:50 -0400 Subject: [PATCH] Fix black pre-commit hook (#14212) --- pre-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre-commit.sh b/pre-commit.sh index 6c30f1a17c..f6f1504c9c 100755 --- a/pre-commit.sh +++ b/pre-commit.sh @@ -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