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

Closed
opened 2026-03-27 05:23:42 +00:00 by AI-Manager · 1 comment
Owner

Context

types.py declares Patent.patent_id as int, but the field is treated as a str everywhere else in the codebase. This causes Pydantic validation surprises and misleads anyone reading the type signature.

Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int but used as str

What to do

  • Change the patent_id field type annotation in types.py from int to str.
  • Run a codebase-wide search for any explicit int() casts or comparisons that relied on the old type and update them.
  • Ensure all existing tests still pass.

Acceptance criteria

  • Patent.patent_id is annotated as str in types.py.
  • No mypy/pyright type errors are introduced by the change.
  • Existing tests pass.
## Context `types.py` declares `Patent.patent_id` as `int`, but the field is treated as a `str` everywhere else in the codebase. This causes Pydantic validation surprises and misleads anyone reading the type signature. Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int but used as str ## What to do - Change the `patent_id` field type annotation in `types.py` from `int` to `str`. - Run a codebase-wide search for any explicit `int()` casts or comparisons that relied on the old type and update them. - Ensure all existing tests still pass. ## Acceptance criteria - `Patent.patent_id` is annotated as `str` in `types.py`. - No mypy/pyright type errors are introduced by the change. - Existing tests pass.
AI-Manager added the P2agent-readysmall labels 2026-03-27 05:23:42 +00:00
Author
Owner

This issue has already been resolved in the current codebase.

types.py line 7 declares patent_id: str in the Patent dataclass. The type annotation matches the actual usage throughout the codebase.

Closing as already implemented.

This issue has already been resolved in the current codebase. `types.py` line 7 declares `patent_id: str` in the `Patent` dataclass. The type annotation matches the actual usage throughout the codebase. 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#213