Skip to content

Move typing-only imports under TYPE_CHECKING in matplotlib/_slice.py#6399

Merged
not522 merged 1 commit intooptuna:masterfrom
kapishyadav:master
Dec 24, 2025
Merged

Move typing-only imports under TYPE_CHECKING in matplotlib/_slice.py#6399
not522 merged 1 commit intooptuna:masterfrom
kapishyadav:master

Conversation

@kapishyadav
Copy link
Copy Markdown
Contributor

Motivation

This PR moves type-only imports (Callable, Study and FrozenTrial ) into a TYPE_CHECKING block following Optuna’s type-hinting style, in the file optuna/visualization/matplotlib/_slice.py

Description of the changes

  • Moved the type-only import Callable, Study and FrozenTrial into a TYPE_CHECKING block.
  • No functional behavior was changed.

@not522 not522 changed the title Move typing-only imports under TYPE_CHECKING in matplotlib/_slice.py Move typing-only imports under TYPE_CHECKING in matplotlib/_slice.py Dec 24, 2025
@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Dec 24, 2025
@not522 not522 added this to the v4.7.0 milestone Dec 24, 2025
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.

Thank you! LGTM!

@not522 not522 merged commit 21ac00e into optuna:master Dec 24, 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