forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation: change int to str in types.py #790
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 annotated asintintypes.pybut is used as astreverywhere in the codebase. This type mismatch causes misleading type-checker errors and could cause runtime bugs if any code path relies on the annotation.Roadmap reference: ROADMAP.md -- P2 Backend -- "
Patent.patent_idtyped asintbut used asstreverywhere"What to do
types.py, change thepatent_idfield annotation frominttostr.mypyorpyrightto confirm no new type errors are introduced.patent_idtointand remove unnecessary conversions.Acceptance criteria
Patent.patent_idis annotated asstrintypes.py.mypy(orpyright) reports no type errors related topatent_id.Triage: Assigned to @developer. Reason: P2 bug, small - type annotation fix.
Already implemented -- closing.
Patent.patent_idis already typed asstrinSPARC/types.py(line 7):patent_id: str. No type annotation fix is needed.No further work needed.