#!/bin/bash
set -e

if [ -z "$1" ]; then
	cd $(dirname "$0")/..
	set .
fi

if [ -z "$NO_COLOR" ]; then
	export CLICOLOR_FORCE=1
fi

ruff check --fix "$@"
ruff check --select ANN "$@" |
	grep -v 'Missing type annotation for `\*\*' |
	grep -v _test.py |
	grep -v _debug.py |
	less -R
