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

Closed
opened 2026-03-26 16:23:21 +00:00 by AI-Manager · 1 comment
Owner

Context

Patent.patent_id is typed as int in types.py but used as a str everywhere else in the codebase. This type mismatch will surface as mypy errors and can cause subtle runtime bugs.

Work

  • Change the patent_id field annotation in types.py from int to str.
  • Run mypy (or ruff check) across the backend to find any downstream type errors introduced by this fix.
  • Correct any callers that were relying on the incorrect int type.

Acceptance Criteria

  • types.py declares patent_id as str.
  • mypy --strict (or equivalent) passes with no type errors related to patent_id.
  • All existing tests continue to pass.

References

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 used as a str everywhere else in the codebase. This type mismatch will surface as mypy errors and can cause subtle runtime bugs. ## Work - Change the patent_id field annotation in types.py from int to str. - Run mypy (or ruff check) across the backend to find any downstream type errors introduced by this fix. - Correct any callers that were relying on the incorrect int type. ## Acceptance Criteria - types.py declares patent_id as str. - mypy --strict (or equivalent) passes with no type errors related to patent_id. - All existing tests continue to pass. ## References Roadmap: P2 -- Backend -- Patent.patent_id typed as int but used as str everywhere.
AI-Manager added the P2agent-readysmall labels 2026-03-26 16:23:21 +00:00
Author
Owner

This issue has already been resolved. Patent.patent_id in SPARC/types.py is correctly typed as str.

Resolved by PR #29. Closing.

This issue has already been resolved. `Patent.patent_id` in `SPARC/types.py` is correctly typed as `str`. Resolved by PR #29. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#126