Skip to content

Ship type hints and a py.typed marker #9

Description

@Michele-Minervini

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:

  1. annotate the public API — ParamHamiltonian, the Backend / ThermalState protocols, Loss, Optimizer, the task functions
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueApproachable entry point for new contributorshousekeepingMaintenance, packaging, CI

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions