fix(bench-tools): 🏷️ ship a py.typed marker - #245
Merged
Conversation
monoprop_bench_tools declares the "Typing :: Typed" classifier and is fully annotated, but shipped no PEP 561 marker. Consumers resolve it as an installed library (it is outside the pyright `include` set), so type checkers treated it as untyped and Pylance reported `reportMissingTypeStubs` on every import in benches/conftest.py. monoprop itself already gets a marker from nanobind's stubgen; this gives the sibling distribution the same. Assisted-by: GitHubCopilot:claude-opus-4.5
Panadestein
requested review from
diagonal-hamiltonian,
fpietra,
ludmilaasb and
robertodr
as code owners
August 19, 2026 10:47
|
Docs preview: https://pr-245.monoprop-docs.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #245 +/- ##
=======================================
Coverage 97.70% 97.70%
=======================================
Files 14 14
Lines 742 742
Branches 98 98
=======================================
Hits 725 725
Misses 12 12
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. |
robertodr
enabled auto-merge (squash)
August 19, 2026 10:55
robertodr
approved these changes
Aug 19, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



🤖 AI text below 🤖
Follow-up to #227.
The diagnosis (confirmed)
monoprop_bench_toolsdeclares theTyping :: Typedclassifier and is fully annotated, but it shipped no PEP 561py.typedmarker. Since it resolves as an installed library (its source tree lives underpackages/, outside the[tool.pyright] includeset), pyright/Pylance treat it as untyped and emitreportMissingTypeStubson every import inbenches/conftest.py.monopropitself is unaffected because nanobind's stubgen already generates a marker (src/monoprop/bindings/CMakeLists.txt,MARKER_FILE).Reproduced and verified with pyright 1.1.408 against the workspace environment:
Before:
After: 0 warnings.
The change
One empty file:
packages/monoprop-bench-tools/src/monoprop_bench_tools/py.typed.Also verified the marker actually reaches consumers of the published distribution —
uv build --package monoprop-bench-tools --wheelproduces a wheel containingmonoprop_bench_tools/py.typed, so hatchling picks it up without any extra[tool.hatch.build]include rule.