forked from 0xWheatyz/SPARC
Fix: correct Patent.patent_id type annotation from int to str in types.py #886
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 declared asintintypes.pybut is used as astreverywhere else in the codebase. This type mismatch can cause subtle bugs and will flag as a mypy/pyright error.Roadmap reference: P2 Backend - Patent.patent_id type fix
What to do
Patent.patent_idfrominttostrintypes.py.int()orstr()casts onpatent_idthat were added to paper over the mismatch and remove them if no longer needed.Acceptance criteria
Patent.patent_idis typed asstrintypes.py.int/strcasts exist that were compensating for the wrong annotation.mypy(or equivalent) reports no type errors on the affected files.This issue has been resolved. The changes are already merged into main.
Patent.patent_id type annotation corrected from int to str in types.py.
Closing as completed.