Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type annotation of SQLAlchemy #4968

Merged
merged 7 commits into from
Oct 2, 2023

Conversation

Alnusjaponica
Copy link
Collaborator

@Alnusjaponica Alnusjaponica commented Sep 30, 2023

Motivation

Resolve #4365

Description of the changes

Replace Column with mapped_column() as remarked at https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html#step-two-replace-declarative-use-of-schema-column-with-orm-mapped-column

@github-actions github-actions bot added the optuna.storages Related to the `optuna.storages` submodule. This is automatically labeled by github-actions. label Sep 30, 2023
@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Merging #4968 (f4125ef) into master (d3fb04f) will decrease coverage by 0.03%.
Report is 9 commits behind head on master.
The diff coverage is 96.55%.

@@            Coverage Diff             @@
##           master    #4968      +/-   ##
==========================================
- Coverage   89.49%   89.46%   -0.03%     
==========================================
  Files         200      200              
  Lines       14863    14870       +7     
==========================================
+ Hits        13301    13304       +3     
- Misses       1562     1566       +4     
Files Coverage Δ
optuna/storages/_rdb/storage.py 94.37% <100.00%> (+0.03%) ⬆️
optuna/storages/_rdb/models.py 97.07% <96.36%> (-0.62%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Alnusjaponica Alnusjaponica added the code-fix Change that does not change the behavior, such as code refactoring. label Sep 30, 2023
@Alnusjaponica Alnusjaponica marked this pull request as ready for review September 30, 2023 04:27
@Alnusjaponica Alnusjaponica changed the title Fix type annotation Fix type annotation of SQLAlchemy Sep 30, 2023
@HideakiImamura HideakiImamura self-assigned this Sep 30, 2023
Copy link
Member

@HideakiImamura HideakiImamura left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing the long running issue!.

@HideakiImamura HideakiImamura removed their assignment Sep 30, 2023
Copy link
Member

@not522 not522 left a comment

Choose a reason for hiding this comment

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

LGTM!

@not522 not522 merged commit 15ec291 into optuna:master Oct 2, 2023
33 checks passed
@not522 not522 added this to the v3.4.0 milestone Oct 2, 2023
@Alnusjaponica Alnusjaponica deleted the fix-type-annotation branch October 26, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-fix Change that does not change the behavior, such as code refactoring. optuna.storages Related to the `optuna.storages` submodule. This is automatically labeled by github-actions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix mypy errors when using SQLAlchemy v2.0.0.
3 participants