Skip to content

Move type-hint imports into type-checking block in median_erroreval.py#6408

Merged
not522 merged 1 commit intooptuna:masterfrom
Sip4818:type-hint-check-10
Jan 14, 2026
Merged

Move type-hint imports into type-checking block in median_erroreval.py#6408
not522 merged 1 commit intooptuna:masterfrom
Sip4818:type-hint-check-10

Conversation

@Sip4818
Copy link
Copy Markdown
Contributor

@Sip4818 Sip4818 commented Jan 9, 2026

Summary

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

What was changed?

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

related to #6029

@not522 not522 changed the title Move type-hint imports into type-checking block in optuna\terminator\median_erroreval.py Move type-hint imports into type-checking block in median_erroreval.py Jan 14, 2026
Copy link
Copy Markdown
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 added this to the v4.7.0 milestone Jan 14, 2026
@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Jan 14, 2026
@not522 not522 merged commit 78c4041 into optuna:master Jan 14, 2026
14 checks passed
@Sip4818 Sip4818 deleted the type-hint-check-10 branch January 14, 2026 04:23
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