forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #1507
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 item: P2 Backend — type annotation fix
Patent.patent_idis annotated asintintypes.pybut is used as astreverywhere in the codebase. This causes mypy/pyright warnings and can lead to subtle runtime bugs (e.g. when constructing file paths or database keys).What to do
types.py, changepatent_id: inttopatent_id: str.patent_idas an integer (arithmetic, zero-padding, etc.) and update accordingly.mypyorpyrightto confirm no new type errors are introduced.Patentobjects with integer IDs.Acceptance criteria
Patent.patent_idis annotated asstrintypes.pypatent_idasintmypypasses without errors related topatent_id[Repo Manager] This issue is already resolved.
Patent.patent_idinSPARC/types.pyis annotated asstr, notint. Closing as complete.