Add basedpyright check to MCP deploy workflow#202
Conversation
Add basedpyright as a CI step in the checks job, matching the convention used in other deploy workflows. Fix all type errors in src/ to pass the check: redis ping awaitable typing, nullable client_id assertions, dict type annotations, frozenset→set for pydantic exclude, and UUID wrapping for get_session_url. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude code review |
|
Claude finished @RafaelPo's task in 1m 37s —— View job Code Review: Add basedpyright check to MCP deploy workflow
Overall this is a clean PR — it adds basedpyright to CI and fixes all 16 type errors with minimal, correct changes. No functional regressions expected. A few observations below. Workflow & Config
Type Fixes
if client.client_id is None:
raise ValueError("client_id is required")Not blocking — just flagging for awareness.
state = request.path_params.get("state", "")This is the right fix to satisfy the type checker (
_UI_EXCLUDE: set[str] = {"is_terminal", "is_screen", "task_type", "error", "started_at"}This avoids the per-call allocation. Minor optimization — not blocking.
SummaryLooks good to merge. The type fixes are all correct and minimal — no functional changes to runtime behavior. The only suggestion worth considering before merge is the |
Avoids per-call set() allocation in routes.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tests back to basedpyright include and fix all type errors: - Add isinstance(_, TextContent) guards before .text access on MCP content unions - Fix async generator return type annotations in fixtures - Use AnyUrl() for redirect_uri/redirect_uris in test_auth - Add None assertions before json.loads on nullable Redis returns - Cast FakeRequest calls with pyright ignore comments - Fix UUID vs str type in _mock_status_response Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude code review |
|
Claude finished @RafaelPo's task in 1m 23s —— View job Code Review: Add basedpyright check to MCP deploy workflow
Clean PR — adds basedpyright to CI and fixes all type errors with minimal, correct changes. No functional regressions expected. Details below. Workflow & Config
Source Fixes
if client.client_id is None:
raise ValueError("client_id is required")Not blocking.
state = request.path_params.get("state", "")Correct.
Test Fixes
SummaryLooks good to merge. All type fixes are correct and minimal with no functional changes to runtime behavior. The |
uv run handles the venv, and both packages are installed in site-packages — no extra paths needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
venvPath = ".." points to the workspace root where .venv lives. Needed for IDEs running basedpyright outside of uv run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
checksjob ofdeploy-mcp.yaml, matching the convention used in other deploy workflows (square, coster)src/so the check passes cleanly (0 errors, 0 warnings)pyproject.tomlbasedpyright config: correctvenvPath, addextraPaths, scopeincludetosrc/Test plan
uv run --directory everyrow-mcp basedpyright --project .🤖 Generated with Claude Code