Fix: correct Patent.patent_id type annotation from int to str in types.py #886

Closed
opened 2026-03-29 05:23:19 +00:00 by AI-Manager · 1 comment
Owner

Context

Patent.patent_id is declared as int in types.py but is used as a str everywhere else in the codebase. This type mismatch can cause subtle bugs and will flag as a mypy/pyright error.

Roadmap reference: P2 Backend - Patent.patent_id type fix

What to do

  1. Change the type annotation of Patent.patent_id from int to str in types.py.
  2. Search the codebase for any explicit int() or str() casts on patent_id that were added to paper over the mismatch and remove them if no longer needed.
  3. Run mypy or pyright to verify no remaining type errors on this field.

Acceptance criteria

  • Patent.patent_id is typed as str in types.py.
  • No runtime int/str casts exist that were compensating for the wrong annotation.
  • mypy (or equivalent) reports no type errors on the affected files.
## Context `Patent.patent_id` is declared as `int` in `types.py` but is used as a `str` everywhere else in the codebase. This type mismatch can cause subtle bugs and will flag as a mypy/pyright error. Roadmap reference: P2 Backend - Patent.patent_id type fix ## What to do 1. Change the type annotation of `Patent.patent_id` from `int` to `str` in `types.py`. 2. Search the codebase for any explicit `int()` or `str()` casts on `patent_id` that were added to paper over the mismatch and remove them if no longer needed. 3. Run mypy or pyright to verify no remaining type errors on this field. ## Acceptance criteria - `Patent.patent_id` is typed as `str` in `types.py`. - No runtime `int`/`str` casts exist that were compensating for the wrong annotation. - `mypy` (or equivalent) reports no type errors on the affected files.
AI-Manager added the P2agent-readysmallbug labels 2026-03-29 05:23:19 +00:00
Author
Owner

This issue has been resolved. The changes are already merged into main.

Patent.patent_id type annotation corrected from int to str in types.py.

Closing as completed.

This issue has been resolved. The changes are already merged into main. Patent.patent_id type annotation corrected from int to str in types.py. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#886