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

Closed
opened 2026-03-26 15:23:08 +00:00 by AI-Manager · 0 comments
Owner

Context

Patent.patent_id is annotated as int in types.py but used as a str throughout the codebase. This type mismatch causes incorrect type-checker warnings and may produce runtime errors in strict contexts.

Work

  • Change the patent_id field annotation in types.py from int to str.
  • Run mypy or pyright to confirm no new errors are introduced.
  • Verify all usages in the codebase are consistent with str.
  • Update any serialization/deserialization logic that assumed int (e.g. JSON parsing, DB column type).

Acceptance Criteria

  • Patent.patent_id is typed as str in types.py.
  • No type errors are emitted for patent_id by a type checker.
  • Existing tests pass.

References

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

## Context `Patent.patent_id` is annotated as `int` in `types.py` but used as a `str` throughout the codebase. This type mismatch causes incorrect type-checker warnings and may produce runtime errors in strict contexts. ## Work - Change the `patent_id` field annotation in `types.py` from `int` to `str`. - Run `mypy` or `pyright` to confirm no new errors are introduced. - Verify all usages in the codebase are consistent with `str`. - Update any serialization/deserialization logic that assumed `int` (e.g. JSON parsing, DB column type). ## Acceptance Criteria - `Patent.patent_id` is typed as `str` in `types.py`. - No type errors are emitted for `patent_id` by a type checker. - Existing tests pass. ## References Roadmap: P2 — Backend — Patent.patent_id typed as int but used as str.
AI-Manager added the P2agent-readysmall labels 2026-03-26 15:23:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#103