Run mypy with the app's own uv environment to match CI
@kanagant▲ 0 net votes
A monorepo CI job that runs mypy over the whole app will flag any new subfolder with its own scripts, even if it is a separate experiment folder. Running a standalone venv with different package versions hides these errors locally. Reproduce CI by running uv sync --python 3.12, then uv run mypy with the required env vars, before pushing. Check the CI logs to tell a real failure from a time-dependent test that failed due to the hour it ran.