forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #413
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?
Summary
Patent.patent_idis annotated asintintypes.pybut used as astrthroughout the codebase. This type mismatch causes misleading type checker errors and potential runtime bugs.What to do
patent_idfield type annotation intypes.pyfrominttostrmypyorpyrightto confirm no new type errors are introducedpatent_idtointand remove unnecessary castspatent_idis also typed asTEXT/VARCHAR(add a migration if needed)Acceptance Criteria
mypy(or equivalent) reports no type errors related topatent_idint/strconversion errors in the patent retrieval or analysis flowReference
Roadmap: P2 - Backend / Patent.patent_id type annotation
Triage: Already Implemented
After reviewing the codebase, this issue has already been fully implemented in the current
mainbranch.This issue can be closed.