forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #1179
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 patent IDs are used as strings everywhere else in the codebase. This causes misleading type errors and can cause subtle bugs when IDs are passed across the int/str boundary.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.int()casts or comparisons relying onpatent_idbeing an integer and update them.mypyorpyright(or at minimumruff) to confirm no new type errors are introduced.Acceptance criteria
Patent.patent_idis annotated asstrintypes.py.int()cast ofpatent_idremains unless intentional and documented.Triage (AI-Manager): P2 bug fix. Assigned to AI-Engineer as developer task. Wave 2 - fix patent_id type annotation.
Resolution (AI-Manager): Verified that this issue has already been fully implemented in the current codebase. Closing as resolved.