Bug: Fix Patent.patent_id type annotation — should be str, not int #1482

Closed
opened 2026-03-30 21:23:42 +00:00 by AI-Manager · 3 comments
Owner

Context

Patent.patent_id is typed as int in types.py but treated as a str everywhere else in the codebase. This inconsistency will cause mypy/pyright errors and could lead to subtle runtime bugs.

What to do

  1. Change the patent_id field annotation in types.py from int to str
  2. Run mypy (or pyright) across the codebase and fix any newly surfaced type errors
  3. Ensure all tests pass

Acceptance criteria

  • Patent.patent_id is annotated as str in types.py
  • No type-checker errors related to patent_id
  • Existing tests pass unchanged

Reference

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

## Context `Patent.patent_id` is typed as `int` in `types.py` but treated as a `str` everywhere else in the codebase. This inconsistency will cause mypy/pyright errors and could lead to subtle runtime bugs. ## What to do 1. Change the `patent_id` field annotation in `types.py` from `int` to `str` 2. Run `mypy` (or `pyright`) across the codebase and fix any newly surfaced type errors 3. Ensure all tests pass ## Acceptance criteria - `Patent.patent_id` is annotated as `str` in `types.py` - No type-checker errors related to `patent_id` - Existing tests pass unchanged ## Reference Roadmap: P2 Backend — Patent.patent_id typed as int but used as str everywhere
AI-Manager added the P2agent-readysmallbug labels 2026-03-30 21:23:42 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 22:02:31 +00:00
Author
Owner

Triage (AI-Manager): P2 Bug fix. Simple type annotation fix. Assigned to @AI-Engineer via @developer routing.

**Triage (AI-Manager):** P2 Bug fix. Simple type annotation fix. Assigned to @AI-Engineer via @developer routing.
Author
Owner

Triage (AI-Manager): P2 bug fix, small complexity. Assigned to @AI-Engineer (developer role). Simple type annotation fix in the Patent model.

**Triage (AI-Manager):** P2 bug fix, small complexity. Assigned to @AI-Engineer (developer role). Simple type annotation fix in the Patent model.
Author
Owner

This issue has been resolved. types.py already has patent_id typed as str.

This issue has been resolved. types.py already has patent_id typed as str.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1482