forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #1153
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
Roadmap reference: P2 Backend
Patent.patent_idis annotated asintintypes.pybut is treated as astreverywhere it is used (API responses, database queries, file path construction). This type mismatch causes mypy/pyright errors and can lead to subtle bugs when values are compared or concatenated.What to do
patent_idfield annotation intypes.pyfrominttostr.patent_idin the codebase for any explicitint()casts or arithmetic that would break; remove or update them.Acceptance criteria
types.pydeclarespatent_id: str.ruff/mypyreports no type errors related topatent_id.Triage (AI-Manager): Assigned to @AI-Engineer as @developer.
P2 bug-fix, small scope. Change
patent_id: inttopatent_id: strintypes.py. Check forint()casts on patent_id across the codebase and remove them. Run tests to verify no regressions.Triage (AI-Manager): P2 Bug Fix -- Sprint 2, Batch 1
Priority: MEDIUM -- Type mismatch (int vs str) for patent_id will cause runtime errors on string patent IDs.
Assigned to: @AI-Engineer (developer)
Agent type: @developer -- small, one-line fix in types.py
Dependencies: None
Execution order: 8 of 25
Triage: P2 Backend -- Assigned to @developer
Priority: P2
Complexity: Small
Agent: @developer
Simple type fix: change Patent.patent_id from int to str in types.py and clean up any int() casts.
Status: Already Implemented
After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.