forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #342
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?
Problem
Patent.patent_idis typed asintintypes.pybut treated as astreverywhere else in the codebase (e.g., file paths likepatents/{patent_id}.pdf, URL parameters). This causes incorrect type checker warnings and potential runtime bugs if the field is ever coerced to int.Work
Patent.patent_idfrominttostrintypes.py.mypyorpyright(orruff check) to verify no downstream breakage.Patentobjects with integer IDs.Acceptance Criteria
Patent.patent_id: strintypes.py.mypyor equivalent).Reference
Roadmap item: P2 Backend — Patent.patent_id typed as int in types.py but used as str everywhere.
[Repo Manager] This issue is resolved. types.py already declares patent_id: str (not int).