Skip to content

fix(types): resolve remaining mypy errors missed by #1253#1296

Open
kovtcharov-amd wants to merge 7 commits into
mainfrom
fix/mypy-remaining
Open

fix(types): resolve remaining mypy errors missed by #1253#1296
kovtcharov-amd wants to merge 7 commits into
mainfrom
fix/mypy-remaining

Conversation

@kovtcharov-amd
Copy link
Copy Markdown
Collaborator

PR #1253 fixed the first batch of mypy errors but missed 12 more that surface when the full codebase is linted. These are blocking CI on all open PRs (#1243, #1244, #1245, #1248, #1249). Once this merges and the open PRs rebase, their lint checks will pass.

Test plan

  • python util/lint.py --all passes with 0 mypy errors

Suppresses no-any-return in providers and factory, fixes Optional
defaults in database.py, adds type: ignore for file_watcher redefs,
casts TransitionStatus in checkpoint_bridge.
@kovtcharov-amd kovtcharov-amd added bug Something isn't working tech debt labels May 29, 2026
@kovtcharov-amd kovtcharov-amd self-assigned this May 29, 2026
@github-actions github-actions Bot added llm LLM backend changes performance Performance-critical changes agents labels May 29, 2026
Ovtcharov added 2 commits May 29, 2026 10:27
…faults

- checkpoint_bridge.py: add `from typing import cast` and CheckpointStatus import
- factory.py: suppress no-any-return on dynamic provider instantiation
- claude.py: fix vision() to materialize Iterator[str] before returning
- database.py: fix update_session Optional defaults, create_session return type
PathValidator.create_backup() creates timestamped backups like
file.YYYYMMDD_HHMMSS.bak.py, not file.py.bak. The assertion was
checking the wrong path, causing a flaky failure.
@github-actions github-actions Bot added the tests Test changes label May 29, 2026
Ovtcharov added 2 commits May 29, 2026 10:50
…up test

- database.py: fix all Optional defaults in add_message/update_session,
  fix return types for add_document/add_message, type params list as Any
- test_code_agent.py: fix second backup assertion in integration test
- database/mixin.py: add assert narrowing after _require_db()
- device.py: cast registry value to str
- installer/mcp_init.py: annotate config_data dict
- rag/pdf_utils.py: annotate positions list
- testing/mocks.py: wrap return in dict()
- ui/database.py: fix Optional defaults in update_document_status, get_setting
- test_code_agent.py: fix second backup assertion in integration test
@github-actions github-actions Bot added the rag RAG system changes label May 29, 2026
Ovtcharov added 2 commits May 29, 2026 11:40
- connectors/store.py: suppress no-any-return on sqlite row returns
- api/app.py: use set comprehension for pids (was list assigned to set)
- validation_parsing.py: suppress attr-defined for mixin attributes
- checklist_generator.py: suppress no-any-return on dict.get returns
- session.py: suppress dict-item on error return branch
- tools.py: annotate _TOOL_REGISTRY, fix Optional func parameter
…l defaults

- tools.py: suppress no-any-return and return-value on get_tool_description
- memory_store.py: bulk fix str = None -> str | None = None across all methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents bug Something isn't working llm LLM backend changes performance Performance-critical changes rag RAG system changes tech debt tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant