set shell := ["bash", "-eu", "-o", "pipefail", "-c"]

set unstable
set lists
set default-list

# Format and lint code
[no-cd]
fmt:
    ruff format
    ruff check --output-format concise --fix --exit-non-zero-on-fix .

# Run type checkers
[no-cd]
[private]
ty-check:
    ty check --output-format concise

[no-cd]
[private]
pyrefly-check:
    pyrefly check --output-format min-text

[no-cd]
[private]
mypy-check:
    mypy --strict

[no-cd]
[private]
zuban-check:
    zuban check

[no-cd]
[private]
pyright-check:
    basedpyright

[parallel]
type-check: zuban-check pyright-check

# Run both formatting and type checking
[no-cd]
lint: fmt type-check

# Run tests
[no-cd]
test:
    pytest --lf

docs:
    sphinx-build -b html docs/ docs/_build/html
