Skip to content

Move typing-only imports under TYPE_CHECKING in FanovaImportanceEvaluator#6279

Merged
nabenabe0928 merged 1 commit intooptuna:masterfrom
euangoodbrand:type-check-fanove-eval
Sep 17, 2025
Merged

Move typing-only imports under TYPE_CHECKING in FanovaImportanceEvaluator#6279
nabenabe0928 merged 1 commit intooptuna:masterfrom
euangoodbrand:type-check-fanove-eval

Conversation

@euangoodbrand
Copy link
Copy Markdown
Contributor

Motivation

This PR continues the type checking improvements tracked in #6029 for optuna/importance/_fanova/_evaluator.py.

Changes

  • Moved Callable import under TYPE_CHECKING in optuna/importance/_fanova/_evaluator.py.
  • Ensures runtime dependencies remain minimal while keeping type hints correct.

Notes

  • Verified with mypye, flake8 and pytest locally -- no issues. All tests pass.

Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

LGTM!

@nabenabe0928 nabenabe0928 added the code-fix Change that does not change the behavior, such as code refactoring. label Sep 17, 2025
@nabenabe0928 nabenabe0928 added this to the v4.6.0 milestone Sep 17, 2025
@nabenabe0928 nabenabe0928 merged commit 743f4a8 into optuna:master Sep 17, 2025
15 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