Skip to content

Fix type checking in optuna.study._frozen.py#6275

Merged
c-bata merged 1 commit intooptuna:masterfrom
GabrielRomaoG:code-fix/fix-type-checking-in-optuna/study/_frozen.py
Sep 16, 2025
Merged

Fix type checking in optuna.study._frozen.py#6275
c-bata merged 1 commit intooptuna:masterfrom
GabrielRomaoG:code-fix/fix-type-checking-in-optuna/study/_frozen.py

Conversation

@GabrielRomaoG
Copy link
Copy Markdown
Contributor

Motivation

Fixing the type checking of the optuna/study/_frozen.py as requested in #6029

Description of the changes

Moved the needed imports to a TYPE_CHECKING block.

I ran the the flake8 command to check if the file doesn't have the type checking problem warning.

@GabrielRomaoG
Copy link
Copy Markdown
Contributor Author

@nabenabe0928, can you please check if this solves the issue in that particular file and recommend someone to approve this PR?

Copy link
Copy Markdown
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for your contribution.

@c-bata c-bata added the code-fix Change that does not change the behavior, such as code refactoring. label Sep 16, 2025
@c-bata c-bata added this to the v4.6.0 milestone Sep 16, 2025
@c-bata c-bata merged commit 5c9cff3 into optuna:master Sep 16, 2025
15 checks passed
@c-bata c-bata changed the title Fix type checking in optuna.study._frozen.py Fix type checking in optuna.study._frozen.py Sep 16, 2025
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants