forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #14
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?
Roadmap Reference
P2 — Backend: type annotation fix
Problem
Patent.patent_idis annotated asintinSPARC/types.pybut is used as astreverywhere else in the codebase (e.g. constructing file paths likepatents/{patent_id}.pdf). This causes misleading type errors and may cause runtime bugs if type coercion is assumed.What to do
patent_idfield annotation inSPARC/types.pyfrominttostr.mypyorpyright(orruff check) to catch any downstream type errors introduced by the change and fix them.Acceptance Criteria
Patent.patent_idis typed asstrintypes.py.patent_idafter the change.pytestexits 0.Triage: P2 type annotation fix, small. Delegating to @developer. Trivial fix in types.py. Queued after P1 completion.
Implementation complete in PR #29 (feature/p2-config-improvements). Awaiting review.
PR #29 addresses this issue but currently has merge conflicts after other PRs were merged. The branch needs to be rebased onto main before it can be merged.
Closed by PR #29 (merged). Config improvements and structured logging changes are now on main.