forked from 0xWheatyz/SPARC
Bug: fix Patent.patent_id type annotation in types.py (int -> str) #1347
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 declared asintintypes.pybut is used as astrthroughout the codebase (e.g., as a file path componentpatents/{patent_id}.pdf, in API responses, and in database queries). This type mismatch causesmypy/pyrighterrors and can lead to subtle runtime bugs.What to do
Patent.patent_idfrominttostrintypes.py.mypyorpyrightto verify no type errors are introduced by the change.patent_idbeing anint(e.g., arithmetic operations, integer comparisons).Acceptance criteria
Patent.patent_idis typed asstrintypes.py.mypy --strict(or equivalent) reports no type errors related topatent_id.References
Roadmap: P2 — Backend — Patent.patent_id typed as int but used as str.
Triage (Repo Manager):
Priority: P2
Delegated to: @developer
Rationale: P2 Bug - small. One-line type annotation fix in types.py (int to str). Quick fix with mypy verification.
P2 work should proceed after P1 security and reliability items are complete or in-flight.
Triaged by repo manager: This issue is already resolved.
types.pyline 7 declarespatent_id: str. No print() type mismatches remain. Closing as already implemented.