Skip to content

ci: run mypy via uv#11397

Merged
axiomofjoy merged 3 commits intomainfrom
xander/run-mypy-with-uv
Feb 23, 2026
Merged

ci: run mypy via uv#11397
axiomofjoy merged 3 commits intomainfrom
xander/run-mypy-with-uv

Conversation

@axiomofjoy
Copy link
Contributor

@axiomofjoy axiomofjoy commented Feb 12, 2026

Note

Medium Risk
CI and local developer workflows for dependency sync and type checking change meaningfully, and mypy’s scope now explicitly includes tests/, which could surface new failures or behavior differences in type-check gating.

Overview
Python type checking is reworked to run mypy via uv. CI’s type-check job now does uv sync --frozen and uv run mypy (and expands sparse-checkout to include src/, packages/, and tests/), replacing the prior tox-driven type-check jobs for main code, unit tests, and integration tests.

Tooling/docs are updated to match the new workflow. The Makefile’s typecheck-python target runs uv run mypy, tox envs for type_check* plus add_symlinks/remove_symlinks are removed, and docs (DEVELOPMENT.md, CONTRIBUTING.md, AGENTS.md, Cursor rule) now point to make typecheck-python / uv run mypy.

Mypy configuration and small typing fixes. pyproject.toml adds files = ["src/", "tests/"], adds types-PyYAML, and several code/test tweaks address typing issues (e.g., wrap Google GenAI async client factories with @asynccontextmanager, avoid setting span attributes with None token counts, and remove a few unnecessary cast/ignore annotations).

Written by Cursor Bugbot for commit c739cee. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.


type-check:
name: Type Check
name: Type Check Python
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type-check job missing phoenix_client trigger condition

Medium Severity

The deleted type-check-integration-tests job had the condition needs.changes.outputs.phoenix == 'true' || needs.changes.outputs.phoenix_client == 'true', meaning it ran type checking when only packages/phoenix-client/ files changed. The consolidated type-check job only triggers on needs.changes.outputs.phoenix == 'true', which doesn't cover packages/phoenix-client/** changes. This silently skips type checking of integration tests (which import from phoenix-client) when only client code changes.

Fix in Cursor Fix in Web

@axiomofjoy axiomofjoy merged commit 12245f6 into main Feb 23, 2026
58 checks passed
@axiomofjoy axiomofjoy deleted the xander/run-mypy-with-uv branch February 23, 2026 06:15
@github-project-automation github-project-automation bot moved this from 👍 Approved to ✅ Done in phoenix Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants