fix: ship py.typed so downstream type checkers see the annotations - #16
Merged
Merged
Conversation
The package is fully annotated and checked with mypy --strict, and shipped no PEP 561 marker. Without it a type checker must ignore a dependency's inline annotations, so every consumer of plumbline saw Any for everything it exposes and had no way to know the types were there. Nothing in this repository noticed, because mypy checks the source directly. The failure was entirely downstream and entirely silent. hatchling picks the file up with no pyproject change; verified present as plumbline/py.typed in the built wheel. A test asserts the marker exists, because an empty file whose only job is to exist is the kind of thing a refactor deletes without anyone missing it for a year. Verified to fail when the file is removed. A second test pins the version against the 0.1.0.dev0 mismatch that shipped in the release. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
The package is fully annotated and checked with
mypy --strict, and shipped no PEP 561 marker.Without
py.typed, a type checker must ignore a dependency's inline annotations. So every consumer of plumbline sawAnyfor everything it exposes, with no way to know the types were there.Nothing here noticed, because mypy checks the source directly. The failure was entirely downstream and entirely silent.
pyproject.tomlchange. Verified present asplumbline/py.typedin the built wheel.tests/test_packaging.pyasserts the marker exists, and I verified it fails when the file is removed. An empty file whose only job is to exist is exactly what a refactor deletes without anyone missing it for a year.__version__ == "0.1.0"and rejectsdev, guarding the mismatch that actually shipped in the v0.1.0 release.