pqm/check-lints.sh

25 lines
376 B
Bash
Raw Normal View History

2023-01-12 10:09:18 +01:00
#!/bin/bash
set -e
cd "$(dirname "$(readlink "$0")")"
rc=0
run() {
# remember last failure
if "$@"; then :; else rc=$?; fi
}
export PYTHONDONTWRITEBYTECODE=1
if [ ! -d venv ]; then
virtualenv -p python3 venv
./venv/bin/pip install trio pyparsing PyYAML mypy flake8 trio-typing types-PyYAML
fi
run ./venv/bin/flake8 pqm
run ./venv/bin/mypy pqm
exit $rc