Repository navigation
chore: ship a py.typed marker (PEP 561) - #92
Open
petercorke wants to merge 1 commit into
Open
petercorke wants to merge 1 commit into
petercorke wants to merge 1 commit into
Conversation
Type checkers ignore the annotations of an installed package unless it carries a py.typed marker. mypy src is clean on the project settings, and hatch includes the file in both the wheel and the sdist (checked from a clean copy, and with a mypy consumer in a throwaway venv, with and without the marker). Fixes #80 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #92 +/- ##
=======================================
Coverage 98.12% 98.12%
=======================================
Files 4 4
Lines 1649 1649
=======================================
Hits 1618 1618
Misses 31 31 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Fixes #80.
Type checkers ignore an installed package's annotations unless it carries a
py.typedmarker. This adds the empty marker tosrc/pgraph/and a "Packaging" entry underUnreleasedin the CHANGELOG.Verification
mypy srcis clean on the project's own settings.py.typedis in both the wheel (pgraph/py.typed) and the sdist (src/pgraph/py.typed). Nopyproject.tomlchange was needed, sincepackages = ["src/pgraph"]already includes it.sys.prefix) and ran mypy on a small consumer script. With the marker, mypy uses pgraph's signatures and reports real errors. With the marker removed, it reportsimport-untypedand treats everything asAny.Not covered
mypy --strictis not clean (51 errors, almost all missing type arguments such as bareNDArrayanddict). The issue asks for clean on the project's own settings, so that is left for a separate issue.🤖 Generated with Claude Code