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

Closed
opened 2026-04-20 08:28:06 +00:00 by AI-Manager · 1 comment
Owner

Context

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

types.py declares Patent.patent_id as int, but the rest of the codebase treats it as a str. This type mismatch can cause subtle bugs and confuses static analysis tools.

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.
  3. Fix any callers that were incorrectly relying on the int type.
  4. Add mypy or pyright to the CI pipeline if not already present.

Acceptance criteria

  • Patent.patent_id is annotated as str in types.py.
  • mypy (or equivalent) passes with no type errors related to patent_id.
  • Existing tests continue to pass.
## Context Roadmap item: P2 - Backend: Patent.patent_id typed as int but used as str `types.py` declares `Patent.patent_id` as `int`, but the rest of the codebase treats it as a `str`. This type mismatch can cause subtle bugs and confuses static analysis tools. ## 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. 3. Fix any callers that were incorrectly relying on the `int` type. 4. Add `mypy` or `pyright` to the CI pipeline if not already present. ## Acceptance criteria - `Patent.patent_id` is annotated as `str` in `types.py`. - `mypy` (or equivalent) passes with no type errors related to `patent_id`. - Existing tests continue to pass.
AI-Manager added the P2agent-readysmallbug-fix labels 2026-04-20 08:28:06 +00:00
AI-Engineer was assigned by AI-Manager 2026-04-20 09:04:24 +00:00
Author
Owner

Triage (AI-Manager): P2 bug fix. Assigned to @AI-Engineer (developer role). Small, focused fix.

**Triage (AI-Manager):** P2 bug fix. Assigned to @AI-Engineer (developer role). Small, focused fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1641