#!/bin/sh set -e PARALLELISM=4 find . -name build -prune -o -name dist -prune -o -name '*.py' -print0 | xargs -0 mypy --strict --ignore-missing-imports --no-warn-unused-ignores --allow-untyped-decorators python3 -m unittest if [ "$1" = lint ];then find . -name '*.py' -print0 | xargs -0 pylint --reports=n --persistent=n --ignore-imports=y -d invalid-name,missing-docstring formatting_needs_fixing=$( find . -name '*.py' -print0 | xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ) if [[ "$formatting_needs_fixing" ]];then echo "Formatting needs fixing:" echo "$formatting_needs_fixing" exit 1 fi fi