forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #1204
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Patent.patent_idis annotated asintintypes.pybut patent IDs are used as strings throughout the codebase (file paths, API responses, database keys). This mismatch causes type checker warnings and can lead to subtle bugs.Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int but used as str everywhere
What to do
patent_idintypes.pyfrominttostr.mypyorpyrightto surface any downstream type errors introduced by the change and fix them.Acceptance criteria
Patent.patent_idis annotated asstrintypes.py.pytestpasses with no regressions.This issue has been resolved on main.
SPARC/types.pydeclarespatent_id: str(confirmed via grep). The type annotation is correct. Closing as complete.