pvc/format

14 lines
259 B
Plaintext
Raw Normal View History

2021-11-06 02:39:38 -04:00
#!/usr/bin/env bash
if ! which black &>/dev/null; then
echo "Black is required to format this project"
exit 1
fi
2021-11-06 02:59:54 -04:00
black --safe --exclude api-daemon/migrations .
2021-11-06 02:39:38 -04:00
ret=$?
if [[ $ret -eq 0 ]]; then
echo "Successfully formatted project!"
fi
exit $ret