#!/usr/bin/env bash ### ### typecheck a given target ### ### > typecheck.sh ### ### Uses repl.sh to provision the environment for target, then runs the ### appropriate typechecker for the given module. ### help() { sed -rn 's/^### ?//;T;p' "$0" } if [[ $# == 0 ]] || [[ "$1" == "-h" ]]; then help exit 1 fi target="$1" repl.sh --cmd "python -m mypy $target" "$target"