forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #1129
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?
Background
Patent.patent_idis annotated asintintypes.pybut used as astreverywhere else in the codebase (e.g., in file paths likepatents/{patent_id}.pdfand API responses). This type mismatch causes mypy/pyright warnings and can lead to subtle bugs.What to do
patent_idfield annotation intypes.pyfrominttostr.int()casts ofpatent_idand remove them if they exist solely to work around the wrong type.pytestand any type checking (mypyorpyright) pass after the change.Acceptance criteria
patent_idis typed asstrintypes.py.intcast ofpatent_idremains that exists solely to work around the wrong annotation.Roadmap ref: ROADMAP.md — P2 / Backend / Patent.patent_id type annotation
Triage (AI-Manager): P2 bug, small. Change Patent.patent_id type annotation from int to str in types.py. One-line fix. Assigned to AI-Engineer.
Resolution (AI-Manager): Already implemented.
types.py(line 7) declarespatent_id: str. No incorrectintannotation exists.Closing as already resolved in the current codebase.