forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation in types.py from int to str #744
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
Roadmap reference: P2 - Patent.patent_id typed as int but used as str
types.pydeclarespatent_idasint, but throughout the codebase it is used as astr(e.g., constructing file paths likepatents/{patent_id}.pdf). This type mismatch can cause silent bugs and fails static analysis.What to do
patent_idtype annotation inPatent(intypes.py) frominttostrmypyorpyrightto confirm no remaining type errors related to this fieldpatent_idtointunnecessarilyAcceptance criteria
Patent.patent_idis annotated asstrintypes.pypatent_idremainResolved.
Patent.patent_idis annotated asstrintypes.py(line 7). No type mismatch remains.