Skip to content

Ship .pyi type stub deterministically + guard py.typed#14

Merged
clayrosenthal merged 1 commit into
devfrom
clayros/sdk-type-stubs
Jul 3, 2026
Merged

Ship .pyi type stub deterministically + guard py.typed#14
clayrosenthal merged 1 commit into
devfrom
clayros/sdk-type-stubs

Conversation

@clayrosenthal

Copy link
Copy Markdown

Description of changes:

The published wheels shipped py.typed without a .pyi stub (pybind11-stubgen ran best-effort/silently-non-fatal while py.typed was touched unconditionally), so mypy saw a typed-but-empty module and reported attr-defined on every symbol downstream (broke holosoma static checks).

  • cibw_before_build.sh: stage the committed python_binding/unitree_interface.pyi deterministically; stubgen only as a fallback that must produce a file; hard guard refusing to write py.typed without a .pyi (exit 1).
  • unitree_interface.pyi: fix 5 latent stub bugs (3 zero-member enums -> X=..., 3 init overloads -> @overload).
  • version 0.1.4 -> 0.1.5 (pyproject + uv.lock).

The published wheels shipped py.typed without a .pyi stub (pybind11-stubgen
ran best-effort/silently-non-fatal while py.typed was touched
unconditionally), so mypy saw a typed-but-empty module and reported
attr-defined on every symbol downstream (broke holosoma static checks).

- cibw_before_build.sh: stage the committed python_binding/unitree_interface.pyi
  deterministically; stubgen only as a fallback that must produce a file;
  hard guard refusing to write py.typed without a .pyi (exit 1).
- unitree_interface.pyi: fix 5 latent stub bugs (3 zero-member enums -> X=...,
  3 __init__ overloads -> @overload).
- version 0.1.4 -> 0.1.5 (pyproject + uv.lock).
@clayrosenthal clayrosenthal added the bug Something isn't working label Jul 3, 2026
@clayrosenthal

Copy link
Copy Markdown
Author

testing build

@clayrosenthal clayrosenthal merged commit 8d17755 into dev Jul 3, 2026
15 checks passed
@clayrosenthal clayrosenthal deleted the clayros/sdk-type-stubs branch July 3, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants