Repository navigation
fix: include typing markers in package wheels - #578
Conversation
There was a problem hiding this comment.
Pull request overview
Adds PEP 561 typing markers (py.typed) across the published microsoft_teams workspace distributions so type checkers treat them as typed packages, and adds a regression test that validates the markers are present in built wheels.
Changes:
- Add
py.typedmarkers to each of the sevenmicrosoft_teams_*distributions. - Remove the
.gitignorerule that preventedpy.typedfrom being tracked. - Add a test that builds all workspace wheels and asserts each expected marker is included in the artifact.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/m365extensions/src/microsoft_teams/m365extensions/py.typed | Adds typing marker for microsoft_teams.m365extensions. |
| packages/graph/src/microsoft_teams/graph/py.typed | Adds typing marker for microsoft_teams.graph. |
| packages/common/src/microsoft_teams/common/py.typed | Adds typing marker for microsoft_teams.common. |
| packages/cards/src/microsoft_teams/cards/py.typed | Adds typing marker for microsoft_teams.cards. |
| packages/botbuilder/src/microsoft_teams/botbuilder/py.typed | Adds typing marker for microsoft_teams.botbuilder. |
| packages/apps/src/microsoft_teams/apps/py.typed | Adds typing marker for microsoft_teams.apps. |
| packages/api/src/microsoft_teams/api/py.typed | Adds typing marker for microsoft_teams.api. |
| packages/api/tests/unit/test_wheel_typing_markers.py | Regression test that wheel builds contain the expected py.typed files. |
| .gitignore | Stops ignoring py.typed so markers can be committed. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@microsoft-github-policy-service agree |
Lily Du (lilyydu)
left a comment
There was a problem hiding this comment.
LGTM. Thanks for making the change!
The only wrinkle: #560 asks for "no type error" on from microsoft_teams.cards import AdaptiveCard, and this will change it fromreportMissingTypeStubs to reportPrivateImportUsage rather than clearing it. This is a separate issue though, moreso b/c of the generated file - will look into this internally.
Fixes #560
What changed
Adds
py.typedto each of the seven publishedmicrosoft_teamsdistributions and removes the obsolete ignore rule that prevented these markers from being tracked.The regression test builds every workspace wheel and verifies that each artifact contains its package marker. Runtime behavior is unchanged.
Validation
pytest packages— 1101 passedruff format --check— cleanruff check— cleanpyright— 0 errors, 0 warnings