Skip to content

Use TYPE_CHECKING in nsgaii/_sampler.py#6565

Merged
not522 merged 1 commit into
optuna:masterfrom
saivedant169:refactor/type-checking-nsgaii-sampler
Mar 24, 2026
Merged

Use TYPE_CHECKING in nsgaii/_sampler.py#6565
not522 merged 1 commit into
optuna:masterfrom
saivedant169:refactor/type-checking-nsgaii-sampler

Conversation

@saivedant169
Copy link
Copy Markdown
Contributor

Part of #6029.

Moved Callable, Sequence, and BaseDistribution into TYPE_CHECKING. All three are only used in type annotations.

ruff check --select TCH passes clean.

Moved Callable, Sequence, and BaseDistribution into TYPE_CHECKING.
All three are only used in type annotations.

Part of optuna#6029
@not522 not522 changed the title Use TYPE_CHECKING in nsgaii/_sampler.py Use TYPE_CHECKING in nsgaii/_sampler.py Mar 24, 2026
@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Mar 24, 2026
@not522 not522 added this to the v4.9.0 milestone Mar 24, 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 merged commit bd316f0 into optuna:master Mar 24, 2026
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