forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #316
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 type annotation
Patent.patent_idis annotated asintintypes.pybut used as a string throughout the codebase. This causes silent type errors and can break Pydantic validation.Work Required
patent_idin thePatentmodel (or dataclass) intypes.pyfrominttostrint()casts onpatent_idand remove themtsc --noEmit(frontend) andmypyorpyright(backend) if available to confirm no new type errors are introducedAcceptance Criteria
Patent.patent_idis typed asstrintypes.pypatent_idtointThis issue has already been resolved in the fork's main branch. Already implemented in PR #29. See SPARC/types.py: patent_id: str.
Closing as completed.