forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #49
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 annotated asintintypes.pybut is used as astreverywhere in the codebase (e.g., as a filename componentpatents/{patent_id}.pdf, as a query parameter, and in API responses). This inconsistency causes mypy/pyright type errors and can lead to subtle runtime bugs.Task
patent_idfield annotation intypes.pyfrominttostr.mypy(orpyright) to surface any cascading type errors and fix them.patent_idtointwhenstris expected (or vice versa).Acceptance Criteria
types.pyannotatespatent_idasstr.mypy backend/reports no errors related topatent_id.References
Roadmap: P2 -- Backend -- Patent.patent_id typed as int in types.py but used as str everywhere.
Closing: Already implemented in PR #29. types.py has patent_id typed as str.