Skip to content

Fix basedpyright type errors blocking CI deploys#221

Merged
RafaelPo merged 2 commits intomainfrom
fix/mcp-basedpyright-errors
Feb 25, 2026
Merged

Fix basedpyright type errors blocking CI deploys#221
RafaelPo merged 2 commits intomainfrom
fix/mcp-basedpyright-errors

Conversation

@RafaelPo
Copy link
Copy Markdown
Contributor

Summary

  • Fix all 47 basedpyright errors across src/ and tests/ that were blocking CI checks job (and therefore staging/production deploys)
  • Add pyrightconfig.json with explicit include: ["src", "tests"] to scope type checking and exclude untracked scripts/
  • Update test_http_real.py integration tests to use the unified input API (data= instead of removed input_csv=)
  • Fix poll_token nullability in result_store.py (poll_token or "")

Changes by category

Type annotations — Add missing generic args (dict[str, Any], list[Any], tuple[Any, ...]) and Any imports across 9 test files and 2 src files.

Runtime fixes:

  • utils.py: Wrap sockaddr[0] in str() to handle str | int from socket.getaddrinfo
  • result_store.py: poll_token or "" to prevent None reaching a str parameter
  • uploads.py: dictdict[str, Any] in _validate_upload return type

Test fixes:

  • test_http_real.py: input_csv=data= (unified input API from PR Unified input API: artifact_id + data replaces input_csv #207)
  • test_auth.py: AnyUrl() wrapper for redirect_uri
  • test_http_integration.py: pd.io.common.StringIOio.StringIO
  • Various: pyright-style ignore comments for intentional type mismatches in test mocks

Test plan

  • basedpyright --project . → 0 errors
  • pytest tests/ -x -q → 347 passed, 28 skipped
  • ruff check src/ tests/ → all checks passed

🤖 Generated with Claude Code

RafaelPo and others added 2 commits February 25, 2026 13:22
Resolve 47 basedpyright errors that were blocking CI deploys. Add
pyrightconfig.json with explicit include paths to scope checks to
src/ and tests/. Update integration tests to use the unified input
API (data= instead of removed input_csv=).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Patch get_access_token in both tools.py and tool_helpers.py so
  ownership checks pass in HTTP-mode integration tests
- Update extract_poll_token to read top-level poll_token field
  instead of parsing it from progress_url query string
- Add missing asyncio.sleep(2) to poll_via_tool (was hammering API)
- Increase default max_polls from 30 to 60 for real API latency

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@RafaelPo RafaelPo merged commit 47005fc into main Feb 25, 2026
5 checks passed
@RafaelPo RafaelPo deleted the fix/mcp-basedpyright-errors branch February 25, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant