| 1 |
.DEFAULT_GOAL := all |
| 2 |
|
| 3 |
.PHONY: .uv ## Check that uv is installed |
| 4 |
.uv: |
| 5 |
@uv -V || echo 'Please install uv: https://docs.astral.sh/uv/getting-started/installation/' |
| 6 |
|
| 7 |
.PHONY: install |
| 8 |
install: .uv ## Install package and dependencies for local development |
| 9 |
uv sync --frozen --all-groups |
| 10 |
uv run pre-commit install --install-hooks |
| 11 |
|
| 12 |
.PHONY: test |
| 13 |
test: |
| 14 |
uv run pytest --cov=typing_inspection |
| 15 |
|
| 16 |
.PHONY: format |
| 17 |
format: |
| 18 |
uv run ruff format |
| 19 |
uv run ruff check --fix --fix-only |
| 20 |
|
| 21 |
.PHONY: format-diff |
| 22 |
format-diff: |
| 23 |
uv run ruff format --diff |
| 24 |
|
| 25 |
.PHONY: lint |
| 26 |
lint: |
| 27 |
uv run ruff format --check |
| 28 |
uv run ruff check |
| 29 |
|
| 30 |
.PHONY: lint-github |
| 31 |
lint-github: |
| 32 |
uv run ruff check --output-format=github |
| 33 |
|
| 34 |
.PHONY: typecheck |
| 35 |
typecheck: |
| 36 |
uv run pyright |
| 37 |
|
| 38 |
.PHONY: all |
| 39 |
all: format lint typecheck test |