* migrate to pyright * Refactor type checking to use Pyright, update dependencies, and clean up code. - Replaced MyPy with Pyright in configuration files and CI workflows. - Updated `pyproject.toml` and `uv.lock` to reflect new dependencies and versions. - Adjusted type hints and fixed minor code issues across various modules for better compatibility with Pyright. - Added new packages `backoff` and `posthog` to the project dependencies. * Update CI workflows to install all extra dependencies for type checking and unit tests * Update dependencies in uv.lock to replace MyPy with Pyright and add nodeenv package. Adjust type hinting in config.py for compatibility with Pyright.
32 lines
No EOL
464 B
Makefile
32 lines
No EOL
464 B
Makefile
.PHONY: install format lint test all check
|
|
|
|
# Define variables
|
|
PYTHON = python3
|
|
UV = uv
|
|
PYTEST = $(UV) run pytest
|
|
RUFF = $(UV) run ruff
|
|
PYRIGHT = $(UV) run pyright
|
|
|
|
# Default target
|
|
all: format lint test
|
|
|
|
# Install dependencies
|
|
install:
|
|
$(UV) sync --extra dev
|
|
|
|
# Format code
|
|
format:
|
|
$(RUFF) check --select I --fix
|
|
$(RUFF) format
|
|
|
|
# Lint code
|
|
lint:
|
|
$(RUFF) check
|
|
$(PYRIGHT) .
|
|
|
|
# Run tests
|
|
test:
|
|
$(PYTEST)
|
|
|
|
# Run format, lint, and test
|
|
check: format lint test |