forked from 0xWheatyz/SPARC
Backend: fix Patent.patent_id type annotation from int to str in types.py #1320
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?
Background
Patent.patent_idis annotated asintintypes.pybut used as astreverywhere else in the codebase. This type inconsistency causes mypy/pyright warnings and can lead to subtle runtime errors (e.g., dict lookups failing due to1234vs"1234").What to do
patent_idintypes.pyfrominttostr.mypy(orpyright) to confirm no other type errors are introduced.intannotation.Acceptance criteria
patent_idis annotated asstrintypes.py.mypy --strict(orpyright) reports no errors related to this field.References
Roadmap: P2 Backend — Patent.patent_id typed as int but used as str everywhere.
Already resolved.
Patent.patent_idis already annotated asstrinSPARC/types.py(line 7):patent_id: str.