Skip to content

Fix string format for optuna/study/study.py#6309

Merged
not522 merged 1 commit intooptuna:masterfrom
unKnownNG:refactor/format-to-fstring
Oct 21, 2025
Merged

Fix string format for optuna/study/study.py#6309
not522 merged 1 commit intooptuna:masterfrom
unKnownNG:refactor/format-to-fstring

Conversation

@unKnownNG
Copy link
Copy Markdown
Contributor

Motivation

As mentioned in issue #6305, Optuna no longer supports Python 3.8. This allows us to replace .format() with f-strings, which provide a cleaner and more readable syntax.

Description of the changes

In the file optuna/study/study.py, I replaced string formatting using .format() with f-strings as suggested in the issue.

Additional Notes

This change is part of the ongoing effort to modernize the codebase and improve readability.

Thank you!

Copy link
Copy Markdown
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

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

LGTM!

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 this to the v4.6.0 milestone Oct 21, 2025
@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Oct 21, 2025
@not522 not522 changed the title Fix string format for optuna\study\study.py #6305 Fix string format for optuna/study/study.py Oct 21, 2025
@not522 not522 merged commit dd632dd into optuna:master Oct 21, 2025
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.

3 participants