Skip to content

fix: resolve all pyright type errors and fix failing tests#14

Merged
ancongui merged 2 commits into
mainfrom
develop
Feb 10, 2026
Merged

fix: resolve all pyright type errors and fix failing tests#14
ancongui merged 2 commits into
mainfrom
develop

Conversation

@ancongui
Copy link
Copy Markdown
Contributor

Summary

  • Fixes all 40 pyright type errors across 19 source files (optional dependency imports, type mismatches, dynamic attribute access patterns)
  • Fixes 16 test failures (mock module fixtures for motor/asyncpg, async test compatibility, HttpTool urllib fallback)
  • All checks passing: pyright 0 errors, ruff 0 errors, 819 tests pass

Test plan

  • pyright src/ — 0 errors, 0 warnings
  • ruff check src/ — all checks passed
  • ruff format --check src/ — 133 files formatted
  • pytest tests/ — 819 passed, 1 skipped

chore: sync main into develop
- Fix 40 pyright errors across 19 source files:
  - Add type: ignore[import-not-found] for optional deps (fastapi, aiokafka,
    aio_pika, asyncpg, motor, httpx, opentelemetry)
  - Fix ModelSettings typing in agents/base.py using cast
  - Fix date vs datetime type mismatch in observability/quota.py
  - Fix stream typing with cast/type-ignore in streaming.py, websocket.py
  - Fix dynamic attribute access in router.py, toolkit.py, steps.py
  - Fix object -> Any typing in logging.py, encryption.py
  - Fix None guard in reasoning/base.py
  - Move importlib.util import to top of file in http.py
- Fix 16 test failures:
  - Add autouse fixtures for mock motor/asyncpg modules in DB store tests
  - Convert sync wrapper tests to async (asyncio.run incompatible with
    pytest-asyncio event loop)
  - Fix HttpTool tests to use urllib fallback path (use_pool=False)

Verified: pyright 0 errors, ruff 0 errors, 819 tests passing.
@ancongui ancongui enabled auto-merge February 10, 2026 22:51
@ancongui ancongui merged commit acc1115 into main Feb 10, 2026
6 checks passed
ancongui added a commit that referenced this pull request May 31, 2026
fix: resolve all pyright type errors and fix failing tests
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