Skip to content

Use f-string in _convert_positional_args.py#6483

Merged
not522 merged 1 commit intooptuna:masterfrom
toroleapinc:fix/issue-6305-fstring-convert-positional-args
Mar 2, 2026
Merged

Use f-string in _convert_positional_args.py#6483
not522 merged 1 commit intooptuna:masterfrom
toroleapinc:fix/issue-6305-fstring-convert-positional-args

Conversation

@toroleapinc
Copy link
Copy Markdown
Contributor

Summary

Replace .format() with f-string in optuna/_convert_positional_args.py.

Remove the _DEPRECATION_WARNING_TEMPLATE string constant and inline the f-string directly at the single call site, making the code more readable and consistent with the preferred style.

Part of #6305

Replace .format() with f-string in optuna/_convert_positional_args.py.
Remove the _DEPRECATION_WARNING_TEMPLATE constant and inline the
f-string directly at the call site.

Part of optuna#6305

Signed-off-by: edvatar <88481784+toroleapinc@users.noreply.github.com>
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 the code-fix Change that does not change the behavior, such as code refactoring. label Mar 2, 2026
@not522 not522 added this to the v4.8.0 milestone Mar 2, 2026
@not522 not522 merged commit 075cc46 into optuna:master Mar 2, 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