forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #1410
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 -- Patent.patent_id typed as int but used as str
types.pyannotatesPatent.patent_idasint, but the rest of the codebase treats it as astr. This discrepancy causes mypy/pyright errors and can lead to subtle runtime bugs.What to do
patent_idfield type annotation intypes.py(and any related Pydantic models) frominttostr.int()orstr()conversions applied topatent_idas workarounds and clean them up.Acceptance criteria
patent_idis annotated asstrthroughout the codebase.mypyorpyrightreports no errors related topatent_id.Triage: Already resolved in main.
Patent.patent_idis typed asstrinSPARC/types.pyline 7. The dataclass definition reads:patent_id: str. Closing as complete.