Skip to content

Use TYPE_CHECKING in nsgaii/_child_generation_strategy.py - #6526

Merged
c-bata merged 1 commit into
optuna:masterfrom
saivedant169:refactor/type-checking-nsgaii-child-gen
Mar 23, 2026
Merged

c-bata merged 1 commit into
optuna:masterfrom
saivedant169:refactor/type-checking-nsgaii-child-gen

Conversation

@saivedant169

Copy link
Copy Markdown
Contributor

Part of #6029.

Moved Callable, Sequence, BaseDistribution, LazyRandomState, and FrozenTrial into TYPE_CHECKING. None are used as runtime values.

ruff check --select TCH passes clean.

…trategy.py

Moved Callable, Sequence, BaseDistribution, LazyRandomState, and
FrozenTrial into TYPE_CHECKING. All are only used in annotations.

Part of optuna#6029

@c-bata c-bata left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@c-bata c-bata added the code-fix Change that does not change the behavior, such as code refactoring. label Mar 23, 2026
@c-bata c-bata added this to the v4.9.0 milestone Mar 23, 2026
@c-bata
c-bata merged commit bc006c8 into optuna:master Mar 23, 2026
13 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