pvc/format
Joshua M. Boniface b9c30baf80 Unify formatting and linting
Ensures optimal formatting in addition to linting during manual deploys
and during pre-commit actions.
2021-11-06 03:10:17 -04:00

15 lines
280 B
Bash
Executable File

#!/usr/bin/env bash
if ! which black &>/dev/null; then
echo "Black is required to format this project"
exit 1
fi
echo "Formatting..."
black --safe --exclude api-daemon/migrations .
ret=$?
if [[ $ret -eq 0 ]]; then
echo "Successfully formatted project!"
fi
exit $ret