Skip to content

fix: resolve CI pyright and ruff failures#30

Merged
ancongui merged 1 commit into
mainfrom
develop
Feb 22, 2026
Merged

fix: resolve CI pyright and ruff failures#30
ancongui merged 1 commit into
mainfrom
develop

Conversation

@ancongui
Copy link
Copy Markdown
Contributor

Summary

  • Fix all 17 pyright type errors flagged by CI
  • Fix ruff I001 import sorting and additional lint violations (E402, F841, F401, B904, UP041, SIM105, SIM108, N806)

Changes (15 files)

  • agents/init.py: Fix import sorting (I001)
  • memory/manager.py: Fix _run_sync type annotation
  • memory/database_store.py: Fix E402 import ordering, remove unused import
  • exposure/rest/router.py: Fix E402 import ordering, remove unused variable
  • exposure/rest/websocket.py: Remove unused variable
  • studio/api/assistant.py: Fix non-existent list_projects import, use ProjectManager
  • studio/api/graphql_api.py: Fix engine.run(input)engine.run(inputs=input)
  • studio/api/project_api.py: Same engine.run fix (3 call sites)
  • studio/api/tunnel.py: Add null safety assertions for _tunnel
  • studio/api/smith.py: Fix UP041, SIM105, SIM108, N806 lint issues
  • studio/api/custom_tools.py: Fix UP041 TimeoutError alias
  • studio/assistant/shared_context.py: Fix non-existent get_project import
  • studio/assistant/smith.py: Fix display_namename, UP041 fixes
  • studio/runtime.py: Fix missing agent_name param and wrong kwarg names in consumer constructors
  • studio/tunnel.py: Fix B904 raise-without-from, UP041

Test plan

  • All 1,273 tests pass
  • Frontend builds clean
  • ruff check passes on all changed files
  • pyright passes on all changed files (0 errors)

- Fix import sorting in agents/__init__.py (ruff I001)
- Fix _run_sync type annotation in memory/manager.py (pyright)
- Fix engine.run() calls to use keyword arg `inputs=` (pyright)
- Fix non-existent list_projects/get_project imports with ProjectManager (pyright)
- Fix UserProfile.display_name → .name attribute (pyright)
- Fix queue consumer constructors missing agent_name param (pyright)
- Add assert for _tunnel null safety in tunnel endpoints (pyright)
- Add type: ignore for optional apscheduler imports (pyright)
- Fix E402 import ordering in router.py and database_store.py
- Fix F841 unused variables, F401 unused import
- Fix B904 raise-without-from in tunnel.py
- Fix UP041 asyncio.TimeoutError → TimeoutError aliases
- Fix SIM105 try/except/pass → contextlib.suppress
- Fix SIM108 if/else → ternary
- Fix N806 uppercase variable names in functions
@ancongui ancongui merged commit 2af1bd3 into main Feb 22, 2026
12 of 13 checks passed
ancongui added a commit that referenced this pull request May 31, 2026
fix: resolve CI pyright and ruff failures
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