Uh oh!
There was an error while loading. Please reload this page.
remove object base class, replace typing aliases - #885
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #885 +/- ##
==========================================
+ Coverage 82.33% 82.36% +0.02%
==========================================
Files 99 99 Lines 12750 12753 +3 Branches 1242 1250 +8 ==========================================
+ Hits 10498 10504 +6 + Misses 1798 1795 -3
Partials 454 454
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.
Pull request overview
Modernizes legacy Python syntax for issue #884 without intended runtime changes.
Changes:
- Replaces
typingcollection aliases with built-in generics. - Removes redundant Python 2-era
objectinheritance.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
ydb/tracing.py | Modernizes tracing annotations. |
ydb/topic.py | Modernizes topic API annotations. |
ydb/table.py | Modernizes table classes and annotations. |
ydb/settings.py | Modernizes header annotation. |
ydb/scripting.py | Removes redundant object bases. |
ydb/scheme.py | Removes redundant object bases. |
ydb/resolver.py | Modernizes resolver classes. |
ydb/query/session.py | Modernizes explain return type. |
ydb/query/pool.py | Modernizes query pool return types. |
ydb/query/base.py | Modernizes callback storage annotation. |
ydb/pool.py | Modernizes pool annotations. |
ydb/observability/metrics.py | Modernizes metrics annotations. |
ydb/import_client.py | Removes redundant object base. |
ydb/export.py | Removes redundant object base. |
ydb/driver.py | Modernizes driver class and annotations. |
ydb/credentials.py | Removes redundant object base. |
ydb/connection.py | Modernizes connection classes and annotations. |
ydb/_utilities.py | Modernizes utility classes and annotations. |
ydb/_typing.py | Modernizes the RPC argument tuple alias. |
ydb/_tx_ctx_impl.py | Removes redundant object base. |
ydb/_sp_impl.py | Removes redundant object base. |
ydb/_session_impl.py | Removes redundant object bases. |
ydb/_apis.py | Modernizes service descriptor classes. |
Suppressed comments (2)
ydb/table.py:1501
- The matching public async method still declares
rename_itemsasList[Tuple[str, str]]atydb/aio/table.py:387-390. Please mirror this annotation cleanup in the async API so sync and async signatures remain aligned.
rename_items: list[tuple[str, str]],
ydb/query/pool.py:302
- The async
explain_with_retriescounterpart still returnsUnion[str, Dict[str, Any]]atydb/aio/query/pool.py:246-253. Please mirror this conversion in the async method so runtime annotations and the sync/async public APIs remain consistent.
) -> Union[str, dict[str, Any]]:
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| add_columns: Optional[list["ydb.Column"]] = None, | ||
| drop_columns: Optional[list[str]] = None, | ||
| settings: Optional["settings_impl.BaseRequestSettings"] = None, | ||
| alter_attributes: Optional[Optional[Dict[str, str]]] = None, | ||
| add_indexes: Optional[List["ydb.TableIndex"]] = None, | ||
| drop_indexes: Optional[List[str]] = None, | ||
| alter_attributes: Optional[Optional[dict[str, str]]] = None, | ||
| add_indexes: Optional[list["ydb.TableIndex"]] = None, |
| def copy_tables( | ||
| self, | ||
| source_destination_pairs: List[Tuple[str, str]], | ||
| source_destination_pairs: list[tuple[str, str]], |
| *, | ||
| result_format: QueryExplainResultFormat = QueryExplainResultFormat.STR, | ||
| ) -> Union[str, Dict[str, Any]]: | ||
| ) -> Union[str, dict[str, Any]]: |
| pool_id: Optional[str] = None, | ||
| **kwargs, | ||
| ) -> List[convert.ResultSet]: | ||
| ) -> list[convert.ResultSet]: |
Can you run copilot review again? |
vgvoleg
commented
Aug 27, 2026
I'm ok with huge diff, let's do all refactoring in one PR |
@vgvoleg How about replacing |
Also, I think we should replace |
These are not all the changes. I've kept it to the typing cleanup for now and will follow up with the rest separately. (to avoid making the diff too large)
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: #884