fix(py-sdk): ship PEP 561 py.typed marker#1002
Merged
SnowboardTechie merged 2 commits intoJul 13, 2026
Merged
Conversation
The package is fully type-annotated but shipped no py.typed marker, so downstream type checkers treated every common_grants_sdk import as untyped. Adding the marker lets consumers pick up the SDK's inline annotations, matching the TypeScript SDK which already ships its .d.ts.
The version job greps all changesets for "common-grants-sdk" and wrote the result to $GITHUB_OUTPUT as key=value. When more than one changeset bumps the package (a feature + this py.typed patch), the grep result is multiline and GitHub Actions rejects the key=value form. Use the heredoc delimiter form so any number of changesets is handled.
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.
Summary
py.typedmarker forcommon-grants-sdkso downstream type checkers use the SDK's inline annotations instead of treating every import as untyped.versionCI job so it handles more than one Python changeset per release (surfaced by adding this changeset alongside the filters one).Changes proposed
lib/python-sdk/common_grants_sdk/py.typedmarker + acommon-grants-sdkpatch changeset.ci-bump-version.yml: write the (possibly multiline)py_changelogto$GITHUB_OUTPUTvia the heredoc form instead ofkey=value.Context for reviewers
py.typed — the package is fully type-annotated but shipped no marker, so
mypyreportedimport-untypedon everycommon_grants_sdkimport and consumers got no type-checking from the SDK. Brings the Python SDK to parity with the TypeScript SDK (which ships its.d.ts). Verified the marker lands in the built wheel — Poetry includes it via the existingpackagesconfig, nopyprojectchange:CI fix — the
versionjob greps all changesets for"common-grants-sdk":and wrote the result to$GITHUB_OUTPUTaskey=value. Once two changesets bump the package (the filtersminoralready on HOLD-filters + thispatch), the grep result is multiline and GitHub Actions rejects thekey=valuewrite. The heredoc form handles any number of changesets. This job also runs on push tomain, so the bug would otherwise have blocked the Python version bump/tag when HOLD-filters merges to main with both changesets present.Targets
HOLD-filtersso py.typed ships in the same coordinatedcommon-grants-sdkrelease as the filters API.Additional information
Empty marker file; the CI change is workflow-only. No runtime or API change.