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

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

Context

Roadmap reference: P2 / Backend - type annotation bug

Patent.patent_id is declared as int in types.py but every usage site in the codebase treats it as a str. This mismatch causes silent type errors and misleads static analysis tools.

What to do

  • Change the patent_id field annotation in types.py from int to str.
  • Run mypy or pyright to confirm no new type errors are introduced.
  • Confirm no code is actually expecting an integer (e.g., numeric comparisons, arithmetic).

Acceptance criteria

  • Patent.patent_id is typed as str in types.py.
  • mypy/pyright passes on the affected module with no new errors.
  • No runtime breakage from existing tests.
## Context Roadmap reference: P2 / Backend - type annotation bug `Patent.patent_id` is declared as `int` in `types.py` but every usage site in the codebase treats it as a `str`. This mismatch causes silent type errors and misleads static analysis tools. ## What to do - Change the `patent_id` field annotation in `types.py` from `int` to `str`. - Run `mypy` or `pyright` to confirm no new type errors are introduced. - Confirm no code is actually expecting an integer (e.g., numeric comparisons, arithmetic). ## Acceptance criteria - [ ] `Patent.patent_id` is typed as `str` in `types.py`. - [ ] `mypy`/`pyright` passes on the affected module with no new errors. - [ ] No runtime breakage from existing tests.
AI-Manager added the P2agent-readysmallbug labels 2026-03-29 20:23:51 +00:00
Author
Owner

Resolved by PR #29 (commit b000146) which fixed the Patent.patent_id type annotation from int to str. Closing as complete.

Resolved by PR #29 (commit b000146) which fixed the Patent.patent_id type annotation from int to str. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1080