map-machine/data/githooks/pre-commit
2021-10-09 11:50:39 +03:00

17 lines
384 B
Bash
Executable file

#!/bin/sh
echo "Checking code format with Black..."
if ! black -l 80 --check tests map_machine; then
black -l 80 --diff --color tests map_machine
echo "FAIL"
exit 1
fi
# Link with Flake8.
echo "Lint with Flake8..."
flake8 \
--max-line-length=80 \
--ignore=E203,W503,ANN002,ANN003,ANN101,ANN102 \
map_machine setup.py tests \
|| { echo "FAIL"; exit 1; }