Skip to content

Conversation

@vgvoleg
Copy link
Collaborator

@vgvoleg vgvoleg commented Jan 28, 2026

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

@vgvoleg vgvoleg marked this pull request as draft January 28, 2026 16:43
@vgvoleg vgvoleg force-pushed the mypy_support branch 2 times, most recently from aad3113 to b89be65 Compare February 2, 2026 16:03
@vgvoleg vgvoleg added the SLO label Feb 2, 2026
@github-actions github-actions bot removed the SLO label Feb 2, 2026
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

🌋 SLO Test Results

Status: 🟢 2 workloads tested • All passed

Workload Metrics Regressions Improvements Links
🟢 ydb-python-sync-query 8 0 0 ReportCheck
🟢 ydb-python-sync-table 8 0 0 ReportCheck

Generated by ydb-slo-action

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces baseline mypy typing support across the YDB Python SDK and wires mypy into CI/tox.

Changes:

  • Adds mypy configuration (pyproject.toml) and a mypy tox environment + CI job.
  • Refactors many SDK modules to add/strengthen type annotations (incl. Generic[DriverT] patterns) and reduce mypy noise.
  • Introduces shared typing helpers (ydb/_typing.py) and applies targeted runtime/typing fixes.

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ydb/types.py Tightens typing around datetime conversion helpers.
ydb/tracing.py Adds type annotations for tracer context/decorators and return types.
ydb/topic.py Minor rename to improve clarity/typing for request params.
ydb/table.py Adds DriverT generics + typing asserts for pool initialization.
ydb/settings.py Adds attribute annotations and typed fluent setters for request settings.
ydb/scheme.py Adds DriverT generics for scheme client typing.
ydb/retries.py Adds typing for retry settings, results, and generator-based retry core.
ydb/resolver.py Improves typing and makes database proto field always a string.
ydb/query/transaction.py Adds generics/overloads for sync vs async drivers and stronger runtime validation.
ydb/query/session.py Adds generics/overloads for sync vs async drivers and tighter stream typing.
ydb/query/pool.py Improves typing for pool driver/session lifecycle and context manager exit.
ydb/query/base.py Refines execute request creation typing and callback handler event typing.
ydb/query/init.py Updates Query client typing and removes deprecated common_utils typing dependency.
ydb/pool.py Adds type annotations for connection cache, discovery, and pool interfaces.
ydb/operation.py Adds typing + minor API cleanup for operation requests.
ydb/oauth2_token_exchange/token_source.py Adds typing and suppresses optional dependency import typing.
ydb/oauth2_token_exchange/token_exchange.py Adds typing and import-order suppressions for optional deps.
ydb/issues.py Generalizes response processing typing via a protocol and modernizes status handling.
ydb/iam/auth.py Suppresses optional dependency import typing issues.
ydb/driver.py Adds typing for config/credentials creation and improves config validation.
ydb/coordination/client.py Makes coordination client generic over sync driver type.
ydb/coordination/base.py Adds generics for coordination base client.
ydb/connection.py Adds type annotations across connection/rpc state and request execution helpers.
ydb/auth_helpers.py Minor env var usage tweak for typing/style.
ydb/aio/table.py Adds async driver typing, pool asserts, and tighter queue typing.
ydb/aio/scheme.py Makes async scheme client generic over async driver type.
ydb/aio/resolver.py Adds typing and explicit async override annotation.
ydb/aio/query/transaction.py Makes async query tx context generic over async driver type.
ydb/aio/query/session.py Makes async query session generic and initializes typed status stream.
ydb/aio/query/pool.py Tightens typing for async session queue and checkout context manager.
ydb/aio/pool.py Adds typing for async connection pool/discovery/cache behavior.
ydb/aio/oauth2_token_exchange.py Adds typing for optional aiohttp dependency import.
ydb/aio/iam.py Suppresses optional dependency import typing issues.
ydb/aio/driver.py Adds typing for async driver config/constructor and stop method.
ydb/aio/credentials.py Adds override typing for async credentials token retrieval.
ydb/aio/coordination/reconnector.py Tightens typing for pending futures/tasks.
ydb/aio/coordination/client.py Makes async coordination client generic over async driver type.
ydb/aio/connection.py Adds typing for async connection internals and request preparation.
ydb/_utilities.py Adds a typed placeholder for optional interceptor import.
ydb/_typing.py New shared typing module (DriverT, SupportedDriverType, GrpcStreamCall, etc.).
ydb/_topic_common/common.py Adds typing for futures in shared event loop helpers.
ydb/_grpc/grpcwrapper/ydb_topic_public_types.py Refines public topic types to allow Optional/Union where proto may omit fields.
ydb/_grpc/grpcwrapper/ydb_topic.py Adds generic proto conversion typing and improves handling of optional fields.
ydb/_grpc/grpcwrapper/ydb_query_public_types.py Adds generic typing for IFromProto implementations.
ydb/_grpc/grpcwrapper/ydb_query.py Adds generic proto conversion typing and improves optional/enum handling.
ydb/_grpc/grpcwrapper/ydb_coordination_public_types.py Aligns enum value access patterns and tightens typing conversions.
ydb/_grpc/grpcwrapper/common_utils.py Introduces generic IFromProto typing and imports shared SupportedDriverType.
tox.ini Adds mypy tox env and updates envlist for typing checks.
pyproject.toml Adds mypy configuration and module-specific overrides.
.github/workflows/style.yaml Runs style checks on Python 3.9 and adds mypy to the workflow matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 55 out of 55 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 55 out of 55 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 55 out of 55 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 55 out of 55 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot removed the SLO label Feb 3, 2026
@vgvoleg vgvoleg marked this pull request as ready for review February 3, 2026 15:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vgvoleg vgvoleg force-pushed the mypy_support branch 2 times, most recently from 6a361b9 to 1bf640d Compare February 4, 2026 08:36
@vgvoleg vgvoleg added the SLO label Feb 4, 2026
@github-actions github-actions bot removed the SLO label Feb 4, 2026
@vgvoleg vgvoleg requested a review from Copilot February 4, 2026 09:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 58 out of 58 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

[testenv:mypy]
skip_install = false
deps =
mypy>=1.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для тестов я бы фиксировал конкретную версию mypy, вроде обновлять её в фоне смысла нет.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

идея пока что такая - появляется новая "более умная" проверка - мы должны на нее среагировать. скорость разработки позволяет

@vgvoleg vgvoleg merged commit 7a14513 into main Feb 4, 2026
25 checks passed
@vgvoleg vgvoleg deleted the mypy_support branch February 4, 2026 10:19
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