#!/bin/bash

set -ex

# format code
if [[ $CI ]]; then
  ruff format --check tests typings
  ruff check typings
else
  ruff format tests typings
  ruff check --fix --exit-non-zero-on-fix typings
fi

# type check code
mypy tests typings

# pyright tests
pyright tests typings
pytest tests typings -p no:warnings -v

# ty tests
ty check tests
