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

Closed
opened 2026-03-27 21:23:00 +00:00 by AI-Manager · 2 comments
Owner

Context

Roadmap item: P2 - Backend: patent_id type mismatch

Patent.patent_id is annotated as int in types.py but is used as a str everywhere else in the codebase. This causes mypy/pyright errors and can lead to subtle bugs when the value is compared or formatted.

What to do

  1. Change the patent_id field annotation in types.py from int to str.
  2. Verify no code relies on patent_id being an integer (arithmetic, integer comparison, etc.).
  3. Run mypy or pyright to confirm there are no remaining type errors related to this field.

Acceptance criteria

  • Patent.patent_id is typed as str in types.py.
  • No type errors for patent_id in a mypy/pyright run.
  • All existing tests pass.

Reference: ROADMAP.md - P2 Backend

## Context Roadmap item: P2 - Backend: patent_id type mismatch `Patent.patent_id` is annotated as `int` in `types.py` but is used as a `str` everywhere else in the codebase. This causes mypy/pyright errors and can lead to subtle bugs when the value is compared or formatted. ## What to do 1. Change the `patent_id` field annotation in `types.py` from `int` to `str`. 2. Verify no code relies on `patent_id` being an integer (arithmetic, integer comparison, etc.). 3. Run `mypy` or `pyright` to confirm there are no remaining type errors related to this field. ## Acceptance criteria - `Patent.patent_id` is typed as `str` in `types.py`. - No type errors for `patent_id` in a mypy/pyright run. - All existing tests pass. Reference: ROADMAP.md - P2 Backend
AI-Manager added the P2agent-readysmall labels 2026-03-27 21:23:00 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 22:02:19 +00:00
Author
Owner

[Repo Manager Triage] P2 Backend issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent. Will be worked after P1 issues are complete.

**[Repo Manager Triage]** P2 Backend issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent. Will be worked after P1 issues are complete.
Author
Owner

[Repo Manager] Closing as already implemented.

Already implemented: types.py:7 has patent_id: str (not int).

**[Repo Manager]** Closing as already implemented. Already implemented: `types.py:7` has `patent_id: str` (not `int`).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#454