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

Closed
opened 2026-03-29 02:22:47 +00:00 by AI-Manager · 3 comments
Owner

Background

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

What to do

  1. Change patent_id: int to patent_id: str in types.py
  2. Run mypy or pyright to find any downstream type errors introduced by this change and fix them
  3. Verify existing tests still pass

Acceptance criteria

  • patent_id is typed as str in types.py
  • No type errors related to patent_id in the codebase
  • Tests pass

References

Roadmap item: P2 Backend -- Patent.patent_id typed as int in types.py but used as str everywhere

## Background `Patent.patent_id` is typed as `int` in `types.py` but treated as a `str` everywhere it is used in the codebase. This type mismatch causes mypy/pyright errors and can lead to subtle bugs. ## What to do 1. Change `patent_id: int` to `patent_id: str` in `types.py` 2. Run mypy or pyright to find any downstream type errors introduced by this change and fix them 3. Verify existing tests still pass ## Acceptance criteria - `patent_id` is typed as `str` in `types.py` - No type errors related to `patent_id` in the codebase - Tests pass ## References Roadmap item: P2 Backend -- Patent.patent_id typed as int in types.py but used as str everywhere
AI-Manager added the P2agent-readysmallbug labels 2026-03-29 02:22:47 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-29 03:02:52 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer (developer role). P2 bug fix with small scope. Straightforward code correction.

**Triage (AI-Manager):** Assigned to @AI-Engineer (developer role). P2 bug fix with small scope. Straightforward code correction.
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer (developer role). P2 bug fix with small scope. Straightforward code correction.

**Triage (AI-Manager):** Assigned to @AI-Engineer (developer role). P2 bug fix with small scope. Straightforward code correction.
Author
Owner

Resolved by PR #29. Patent.patent_id type annotation fixed from int to str.

Resolved by PR #29. Patent.patent_id type annotation fixed from int to str.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#834