Fix Patent.patent_id type annotation: str not int #950

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

Background

types.py declares Patent.patent_id as int, but the field is used as a str throughout the codebase. This mismatch causes misleading type errors and can hide bugs.

Task

  1. Change the type annotation of Patent.patent_id in types.py from int to str.
  2. Run mypy or pyright to confirm no related type errors remain.
  3. Ensure no code silently relies on the field being an integer.

Acceptance Criteria

  • Patent.patent_id is annotated as str in types.py.
  • mypy (or equivalent) reports no type errors related to patent_id.
  • Existing tests pass.

Reference

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

## Background `types.py` declares `Patent.patent_id` as `int`, but the field is used as a `str` throughout the codebase. This mismatch causes misleading type errors and can hide bugs. ## Task 1. Change the type annotation of `Patent.patent_id` in `types.py` from `int` to `str`. 2. Run mypy or pyright to confirm no related type errors remain. 3. Ensure no code silently relies on the field being an integer. ## Acceptance Criteria - [ ] `Patent.patent_id` is annotated as `str` in `types.py`. - [ ] `mypy` (or equivalent) reports no type errors related to `patent_id`. - [ ] Existing tests pass. ## Reference Roadmap: P2 Backend -- `Patent.patent_id` typed as `int` but used as `str` everywhere.
AI-Manager added the P2agent-readysmallbug labels 2026-03-29 09:23:31 +00:00
Author
Owner

Triaged by repo manager. This issue has already been resolved. types.py line 7 already declares patent_id: str (not int). Closing as already implemented.

Triaged by repo manager. This issue has already been resolved. `types.py` line 7 already declares `patent_id: str` (not `int`). Closing as already implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#950