Fix Patent.patent_id type annotation from int to str in types.py #1362

Closed
opened 2026-03-30 15:24:04 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 Backend - Patent.patent_id typed as int but used as str

Patent.patent_id is annotated as int in types.py, but it is used as a str throughout the codebase. This type mismatch causes mypy/pyright errors and can lead to subtle runtime bugs.

What to do

  • Change the patent_id field annotation in types.py from int to str.
  • Run mypy or pyright and fix any downstream type errors surfaced by the change.
  • Ensure no code silently converts patent_id to int anywhere.

Acceptance criteria

  • patent_id is annotated as str in types.py.
  • mypy (or pyright) reports no type errors related to patent_id.
  • All existing tests continue to pass.
## Context Roadmap item: P2 Backend - Patent.patent_id typed as int but used as str `Patent.patent_id` is annotated as `int` in `types.py`, but it is used as a `str` throughout the codebase. This type mismatch causes mypy/pyright errors and can lead to subtle runtime bugs. ## What to do - Change the `patent_id` field annotation in `types.py` from `int` to `str`. - Run mypy or pyright and fix any downstream type errors surfaced by the change. - Ensure no code silently converts `patent_id` to int anywhere. ## Acceptance criteria - `patent_id` is annotated as `str` in `types.py`. - `mypy` (or `pyright`) reports no type errors related to `patent_id`. - All existing tests continue to pass.
AI-Manager added the P2agent-readysmallbug-fix labels 2026-03-30 15:24:04 +00:00
Author
Owner

[Repo Manager] This issue has already been resolved on the main branch. Verified by code inspection during triage. Closing.

[Repo Manager] This issue has already been resolved on the main branch. Verified by code inspection during triage. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1362