Mark package as typed - #899
Merged
Merged
Conversation
# Conflicts: # CHANGELOG.md # ydb/observability/metrics.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #899 +/- ##
==========================================
+ Coverage 82.61% 82.62% +0.01%
==========================================
Files 99 99
Lines 12939 12945 +6
Branches 1268 1268
==========================================
+ Hits 10689 10696 +7
Misses 1798 1798
+ Partials 452 451 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Automated coverage is missing for the wheel and source-distribution packaging contract.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Marks the SDK as PEP 561 typed and strengthens static type checking.
Changes:
- Packages
py.typedin wheels and source distributions. - Enables stricter mypy checks and corrects affected annotations.
- Preserves decorated function signatures and updates the changelog.
File summaries
| File | Description |
|---|---|
CHANGELOG.md |
Records typed-package support. |
MANIFEST.in |
Includes the marker in source distributions. |
pyproject.toml |
Strengthens mypy configuration. |
setup.py |
Packages the marker and adds the typing classifier. |
ydb/py.typed |
Declares PEP 561 support. |
ydb/_utilities.py |
Preserves decorator signatures. |
ydb/retries.py |
Types retry decorators generically. |
ydb/table.py |
Corrects table client annotations. |
ydb/topic.py |
Makes optional metadata explicit. |
ydb/observability/metrics.py |
Preserves metrics decorator signatures. |
ydb/query/base.py |
Types the session decorator and nullable RPC state. |
ydb/query/session.py |
Corrects optional query arguments. |
ydb/query/transaction.py |
Types the transaction decorator. |
ydb/aio/table.py |
Corrects optional async table arguments. |
ydb/aio/query/session.py |
Mirrors query annotation fixes asynchronously. |
Review details
- Files reviewed: 14/15 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
vgvoleg
approved these changes
Sep 15, 2026
vgvoleg
enabled auto-merge (squash)
September 15, 2026 13:46
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.
Pull request type
What is the current behavior?
The package does not include a PEP 561
py.typedmarker, so type checkers do not use the SDK's inline type annotations when it is installed as a dependency.Issue Number: #896
What is the new behavior?
The package is marked as typed according to PEP 561. The
py.typedmarker is included in both wheel and source distributions, allowing type checkers to use the SDK's inline annotations.The PR also enables stricter mypy checks for implicit optional types and untyped decorators, and fixes the affected annotations.
Other information
There are no runtime behavior changes.
Verified with:
tox -e mypytox -e blacktox -e styletox -e py -- ydb -v