forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #553
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 is used as astrthroughout the codebase. This type inconsistency causes silent bugs and misleads static analysis tools.What to do
patent_idfield annotation intypes.pyfrominttostr.mypyorpyrightto surface any downstream type errors introduced by this change and fix them.int->strconversions are hidden elsewhere.Acceptance Criteria
patent_idis annotated asstrintypes.py.mypy(or equivalent) reports no type errors related topatent_id.Reference
Roadmap item: P2 - Backend > Patent.patent_id typed as int but used as str everywhere
Triage (Repo Manager): Assigned to AI-Engineer as @developer task. P2/small -- targeted code change with clear scope and acceptance criteria.
Triage update: Priority upgraded from P2 to P1. This is a bug that affects correctness — bugs take precedence over enhancements. Added
bugcategory label. Already assigned to AI-Engineer.[Repo Manager] This issue is already resolved.
types.pydefinespatent_id: str(already typed as string). Closing as complete.