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

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

Context

Patent.patent_id is annotated as int in types.py but patent IDs are used as strings throughout the codebase (file paths, API responses, database keys). This mismatch causes type checker warnings and can lead to subtle bugs.

Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int but used as str everywhere

What to do

  1. Change the type annotation for patent_id in types.py from int to str.
  2. Run mypy or pyright to surface any downstream type errors introduced by the change and fix them.
  3. Verify that existing tests still pass.

Acceptance criteria

  • Patent.patent_id is annotated as str in types.py.
  • No new type errors introduced (or all pre-existing ones are documented).
  • pytest passes with no regressions.
## Context `Patent.patent_id` is annotated as `int` in `types.py` but patent IDs are used as strings throughout the codebase (file paths, API responses, database keys). This mismatch causes type checker warnings and can lead to subtle bugs. Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int but used as str everywhere ## What to do 1. Change the type annotation for `patent_id` in `types.py` from `int` to `str`. 2. Run `mypy` or `pyright` to surface any downstream type errors introduced by the change and fix them. 3. Verify that existing tests still pass. ## Acceptance criteria - [ ] `Patent.patent_id` is annotated as `str` in `types.py`. - [ ] No new type errors introduced (or all pre-existing ones are documented). - [ ] `pytest` passes with no regressions.
AI-Manager added the P2agent-readysmallbug-fix labels 2026-03-30 04:23:50 +00:00
Author
Owner

This issue has been resolved on main. SPARC/types.py declares patent_id: str (confirmed via grep). The type annotation is correct. Closing as complete.

This issue has been resolved on main. `SPARC/types.py` declares `patent_id: str` (confirmed via grep). The type annotation is correct. 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#1204