Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 584 Bytes

type-stubs.md

File metadata and controls

16 lines (13 loc) · 584 Bytes

updating type stubs

  1. install pybind11-stubgen
  2. run pybind11-stubgen _humanleague
  3. copy stubs/_humanleague/__init__.pyi to humanleague
  4. edit the file:
    1. delete the line import _humanleague

    2. import numpy.typing and edit numpy types as necessary. The following definitions are also useful:

      FloatArray1d = npt.NDArray[np.float64] | list[float]
      IntArray1d = typing.Sequence[int]
    3. move misplaced docstrs for overloaded functions/methods as necessary

    4. replace __version__ = ... with __version__: str