summaryrefslogtreecommitdiff
path: root/misc/scripts/black_format.sh
diff options
context:
space:
mode:
Diffstat (limited to 'misc/scripts/black_format.sh')
-rwxr-xr-xmisc/scripts/black_format.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/misc/scripts/black_format.sh b/misc/scripts/black_format.sh
index 04dfe32f60..f93e8cbc2a 100755
--- a/misc/scripts/black_format.sh
+++ b/misc/scripts/black_format.sh
@@ -16,11 +16,9 @@ PY_FILES=$(find \( -path "./.git" \
black -l 120 $PY_FILES
git diff > patch.patch
-FILESIZE="$(stat -c%s patch.patch)"
-MAXSIZE=5
# If no patch has been generated all is OK, clean up, and exit.
-if (( FILESIZE < MAXSIZE )); then
+if [ ! -s patch.patch ] ; then
printf "Files in this commit comply with the black style rules.\n"
rm -f patch.patch
exit 0