Skip to content

python(fix): add py.typed file to proto dir#524

Merged
wei-qlu merged 4 commits into
mainfrom
python/add-py-typed-marker
Apr 6, 2026
Merged

python(fix): add py.typed file to proto dir#524
wei-qlu merged 4 commits into
mainfrom
python/add-py-typed-marker

Conversation

@wei-qlu
Copy link
Copy Markdown
Contributor

@wei-qlu wei-qlu commented Apr 6, 2026

What was changed:

Our proto package generates .pyi type stubs via mypy-protobuf, but without a PEP 561 py.typed marker file, type checkers ignore them entirely. This means downstream consumers (and our own Mypy) silently treat all proto imports as Any, no real type checking occurs on proto types.

Added an empty py.typed file to the sift proto package directory and toml so type checkers discover and use the existing stubs.

Validation

Existing tests passed and verified a local installation of sift-stack-py included the py.typed marker in the sift proto directory.

@wei-qlu wei-qlu requested a review from solidiquis April 6, 2026 18:31
@wei-qlu wei-qlu requested a review from alexluck-sift April 6, 2026 19:54
@wei-qlu wei-qlu marked this pull request as ready for review April 6, 2026 20:00
@wei-qlu wei-qlu merged commit d0a7e56 into main Apr 6, 2026
22 checks passed
@wei-qlu wei-qlu deleted the python/add-py-typed-marker branch April 6, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants