forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation: change int to str in types.py #1555
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
types.pydeclaresPatent.patent_idasint, but every usage site in the codebase treats it as astr. This causes silent type mismatches and will surface as bugs when strict type checking is enabled.Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int but used as str everywhere
What to do
patent_idfield annotation intypes.pyfrominttostr.mypyorpyrightto identify any further type errors introduced by the change and fix them.Acceptance criteria
Patent.patent_idis annotated asstrintypes.py.patent_idremain.This issue has been resolved. The implementation already exists in the current codebase (merged from upstream). Verified by repo manager during triage on 2026-04-19.