From 40aa809c494019a3e9d69250133baa2d7c8c3394 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 26 Aug 2025 17:55:05 -0400 Subject: Add typecheck.sh with Python support This runs a repl and calls mypy to typecheck the given target. Not only is this *much* faster than using bild to typecheck stuff, but it also produces less noise in the logs, so I can have aider call this and the output won't overwhelm the llm. --- Omni/Ide/typecheck.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 Omni/Ide/typecheck.sh (limited to 'Omni/Ide/typecheck.sh') diff --git a/Omni/Ide/typecheck.sh b/Omni/Ide/typecheck.sh new file mode 100755 index 0000000..9de8b54 --- /dev/null +++ b/Omni/Ide/typecheck.sh @@ -0,0 +1,18 @@ +#!/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" -- cgit v1.2.3