Skip to content

Replace .format() with f-string in test_hyperband.py#6411

Merged
c-bata merged 1 commit intooptuna:masterfrom
Banjiola:fix-format-fstrings
Jan 15, 2026
Merged

Replace .format() with f-string in test_hyperband.py#6411
c-bata merged 1 commit intooptuna:masterfrom
Banjiola:fix-format-fstrings

Conversation

@Banjiola
Copy link
Copy Markdown
Contributor

Motivation

This PR addresses Issue #6305 by refactoring string formatting in optuna/tests/pruners_tests/test_hyperband.py.

Description of the changes

Replaced all instances of the .format(...) method with modern f-strings. Specifically changed line 134 and line 169.

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. Thank you for your contribution.

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