forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #213
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 the field is treated as astreverywhere else in the codebase. This causes Pydantic validation surprises and misleads anyone reading the type signature.Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int but used as str
What to do
patent_idfield type annotation intypes.pyfrominttostr.int()casts or comparisons that relied on the old type and update them.Acceptance criteria
Patent.patent_idis annotated asstrintypes.py.This issue has already been resolved in the current codebase.
types.pyline 7 declarespatent_id: strin thePatentdataclass. The type annotation matches the actual usage throughout the codebase.Closing as already implemented.