map-machine/data/githooks/pre-commit
Sergey Vartanov efda73a436 Fix shebangs.
2022-06-06 02:14:18 +03:00

19 lines
447 B
Bash
Executable file

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