Skip to content

Move type-hint import inside Type-Checking block in optuna\terminator\erroreval.py#6395

Merged
c-bata merged 1 commit intooptuna:masterfrom
Sip4818:type-hint-check-7
Dec 23, 2025
Merged

Move type-hint import inside Type-Checking block in optuna\terminator\erroreval.py#6395
c-bata merged 1 commit intooptuna:masterfrom
Sip4818:type-hint-check-7

Conversation

@Sip4818
Copy link
Copy Markdown
Contributor

@Sip4818 Sip4818 commented Dec 20, 2025

Summary

This PR moves type-only imports (FrozenTrial and Trial ) into a TYPE_CHECKING block following Optuna’s type-hinting style, in the file optuna\terminator\erroreval.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-hint' import inside Type-Checking block in 'optuna\terminator\erroreval.py' Move type-hint import inside Type-Checking block in optuna\terminator\erroreval.py Dec 20, 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 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
@c-bata c-bata merged commit 08001f6 into optuna:master Dec 23, 2025
14 checks passed
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