The package has no py.typed marker, so downstream users get no type information even though much of the code is already annotated. Adding the marker without first making the public surface consistently typed would be worse than nothing, so this is two steps:
- annotate the public API —
ParamHamiltonian, the Backend / ThermalState protocols, Loss, Optimizer, the task functions
- add
src/qbm/py.typed and the corresponding package-data entry in pyproject.toml
Notes
backends/base.py already defines Protocol classes, so the shapes are largely settled. Run mypy (or pyright) over src/qbm and fix what it finds; do not add Any to silence it.
Good first issue: mechanical, well-scoped, and it forces you to read the public surface.
The package has no
py.typedmarker, so downstream users get no type information even though much of the code is already annotated. Adding the marker without first making the public surface consistently typed would be worse than nothing, so this is two steps:ParamHamiltonian, theBackend/ThermalStateprotocols,Loss,Optimizer, the task functionssrc/qbm/py.typedand the correspondingpackage-dataentry inpyproject.tomlNotes
backends/base.pyalready definesProtocolclasses, so the shapes are largely settled. Runmypy(orpyright) oversrc/qbmand fix what it finds; do not addAnyto silence it.Good first issue: mechanical, well-scoped, and it forces you to read the public surface.