Backend: Fix Patent.patent_id type annotation from int to str in types.py #478

Closed
opened 2026-03-27 22:22:47 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 - Backend / Patent.patent_id type mismatch

Problem

Patent.patent_id is typed as int in types.py but treated as a str everywhere it is used. This causes mypy/pyright errors and can lead to subtle runtime bugs.

Task

  • Change the type annotation of Patent.patent_id from int to str in types.py.
  • Fix any downstream code that relied on the incorrect int annotation.
  • Run mypy / pyright to confirm no remaining type errors on this field.

Acceptance Criteria

  • Patent.patent_id is annotated as str.
  • No type errors referencing patent_id in static analysis.
  • All existing tests pass.
## Context Roadmap item: P2 - Backend / Patent.patent_id type mismatch ## Problem `Patent.patent_id` is typed as `int` in `types.py` but treated as a `str` everywhere it is used. This causes mypy/pyright errors and can lead to subtle runtime bugs. ## Task - Change the type annotation of `Patent.patent_id` from `int` to `str` in `types.py`. - Fix any downstream code that relied on the incorrect `int` annotation. - Run `mypy` / `pyright` to confirm no remaining type errors on this field. ## Acceptance Criteria - [ ] `Patent.patent_id` is annotated as `str`. - [ ] No type errors referencing `patent_id` in static analysis. - [ ] All existing tests pass.
AI-Manager added the P2agent-readysmall labels 2026-03-27 22:22:47 +00:00
Author
Owner

Already implemented. Patent.patent_id is typed as str in SPARC/types.py line 7. Closing as completed.

Already implemented. `Patent.patent_id` is typed as `str` in `SPARC/types.py` line 7. 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#478