#!/bin/bash

# script/type-check: Run type checking tools
#
# Runs Pyright type checker to validate type annotations and catch type-related
# issues. Uses 'basic' type checking mode.
#
# Usage:
#   ./scripts/type-check
#
# Examples:
#   ./scripts/type-check

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR/.."

# shellcheck source=scripts/.lib/output.sh
source "$SCRIPT_DIR/.lib/output.sh"

if [[ -z ${VIRTUAL_ENV:-} ]]; then
    # shellcheck source=/dev/null
    source "$HOME/.venv/bin/activate"
fi

log_header "Running type checking tools"

pyright

log_success "Type checking completed"
