Skip to content

Move type-check imports to TYPE_CHECKING in optuna\terminator\improvement\emmr.py#6396

Merged
c-bata merged 2 commits intooptuna:masterfrom
Sip4818:type-hint-check-8
Dec 23, 2025
Merged

Move type-check imports to TYPE_CHECKING in optuna\terminator\improvement\emmr.py#6396
c-bata merged 2 commits intooptuna:masterfrom
Sip4818:type-hint-check-8

Conversation

@Sip4818
Copy link
Copy Markdown
Contributor

@Sip4818 Sip4818 commented Dec 21, 2025

Summary

This PR moves type-only imports (FrozenTrial ) into a TYPE_CHECKING block following Optuna’s type-hinting style, in the file optuna\terminator\improvement\emmr.py

What was changed?

  • Moved type-only imports into a TYPE_CHECKING: block
  • Updated annotations accordingly
  • No functional behavior changed

related to #6029

@Sip4818 Sip4818 changed the title Move type-check imports to TYPE_CHECKING in optuna\terminator\improvement\emmr.py Move type-check imports to TYPE_CHECKING in optuna\terminator\improvement\emmr.py Dec 21, 2025
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 merged commit 1234e93 into optuna:master Dec 23, 2025
14 checks passed
@c-bata c-bata added the code-fix Change that does not change the behavior, such as code refactoring. label Dec 23, 2025
@c-bata c-bata added this to the v4.7.0 milestone Dec 23, 2025
@Sip4818 Sip4818 deleted the type-hint-check-8 branch December 29, 2025 12:38
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