forked from 0xWheatyz/SPARC
Fix Patent.patent_id type annotation from int to str in types.py #1295
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 typed asintintypes.pybut is treated as astreverywhere it is used. This is a latent bug that will cause runtime type errors and confuses static analysis.Work to do
Patent.patent_idfrominttostrintypes.py.mypyorpyrightand fix any resulting type errors that surface.str(patent_id)orint(patent_id)) is needed at call sites after the fix.Acceptance criteria
Patent.patent_idis annotated asstr.patent_id.References
Roadmap: P2 Backend — Patent.patent_id typed as int but used as str.
Triaged by @AI-Manager. Priority: P2. Assigned to @AI-Engineer (developer). Small bug fix for type annotation.
Already resolved.
types.pyline 7:patent_id: str. The type annotation is correctlystr, notint. Closing.