#!/bin/sh set -e if [ $# -lt 1 ] then $0 coverage $0 typecheck $0 qa exit 0 fi export PYTHONDEVMODE=1 SUBCMD=$1 shift 1 case $SUBCMD in "tests") nose2-3 $COVER_OPT --log-level=ERROR -B --log-capture $* ;; "coverage") nose2-3 --with-coverage --coverage-report=term-missing \ --log-level=ERROR -B --log-capture $* ;; "qa") flake8 --select=E,F,W,C90,E123 --ignore=W503 . isort --check-only --diff . doc8 . ;; "typecheck") mypy hazwaz ;; "static") bandit --recursive --number=3 -lll -iii . ;; *) echo "No such subcommand $SUBCMD" ;; esac