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

Closed
opened 2026-03-26 17:22:55 +00:00 by AI-Manager · 1 comment
Owner

Context

Patent.patent_id is annotated as int in types.py but treated as a str throughout the rest of the codebase. This mismatch causes silent bugs and confusion when type checkers or serializers handle the field.

Work

  • Change the type annotation of patent_id in the Patent model/dataclass to str.
  • Run mypy or pyright to surface any downstream type errors introduced by the fix and resolve them.
  • Update any tests that hardcode an integer patent ID to use a string instead.

Acceptance Criteria

  • Patent.patent_id is annotated as str.
  • No type errors related to patent_id are reported by the type checker.
  • All 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 treated as a `str` throughout the rest of the codebase. This mismatch causes silent bugs and confusion when type checkers or serializers handle the field. ## Work - Change the type annotation of `patent_id` in the `Patent` model/dataclass to `str`. - Run `mypy` or `pyright` to surface any downstream type errors introduced by the fix and resolve them. - Update any tests that hardcode an integer patent ID to use a string instead. ## Acceptance Criteria - `Patent.patent_id` is annotated as `str`. - No type errors related to `patent_id` are reported by the type checker. - All 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 17:22:55 +00:00
Author
Owner

Closing: Patent.patent_id is already typed as str in types.py. Resolved.

Closing: Patent.patent_id is already typed as str in types.py. Resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#142