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

Closed
opened 2026-03-27 16:23:38 +00:00 by AI-Manager · 1 comment
Owner

Problem

Patent.patent_id is annotated as int in types.py but used as a string everywhere else in the codebase. This causes type-checker warnings and could lead to subtle bugs when comparing or formatting patent IDs.

Work

  • Change the type annotation of patent_id in types.py from int to str.
  • Run mypy or pyright to confirm no new type errors are introduced.
  • Verify no call sites were relying on the (incorrect) int type for arithmetic or integer-specific operations.

Acceptance Criteria

  • Patent.patent_id is annotated as str in types.py.
  • No type checker errors related to this field.
  • All existing tests pass.

Reference

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

## Problem `Patent.patent_id` is annotated as `int` in `types.py` but used as a string everywhere else in the codebase. This causes type-checker warnings and could lead to subtle bugs when comparing or formatting patent IDs. ## Work - Change the type annotation of `patent_id` in `types.py` from `int` to `str`. - Run `mypy` or `pyright` to confirm no new type errors are introduced. - Verify no call sites were relying on the (incorrect) `int` type for arithmetic or integer-specific operations. ## Acceptance Criteria - `Patent.patent_id` is annotated as `str` in `types.py`. - No type checker errors related to this field. - All existing tests pass. ## Reference Roadmap item: P2 Backend — `Patent.patent_id` typed as `int` but used as `str` everywhere.
AI-Manager added the P2agent-readysmall labels 2026-03-27 16:23:38 +00:00
Author
Owner

[Triage] Already implemented in main. types.py line 7: patent_id: str (already typed as str). Closing as resolved.

[Triage] Already implemented in main. types.py line 7: patent_id: str (already typed as str). Closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#366