Skip to content

Use f-strings in optuna/_experimental.py#6390

Merged
not522 merged 1 commit intooptuna:masterfrom
Rohan0497:fix-fstrings-experimental
Dec 18, 2025
Merged

Use f-strings in optuna/_experimental.py#6390
not522 merged 1 commit intooptuna:masterfrom
Rohan0497:fix-fstrings-experimental

Conversation

@Rohan0497
Copy link
Copy Markdown
Contributor

Motivation

This PR addresses #6305. Since Optuna no longer supports Python 3.8, we can use f-strings instead of .format().

Description of the changes

Replaced .format() usage with f-strings in optuna/_experimental.py (one file only).

Testing

  • pre-commit run --all-files
  • pytest tests/test_experimental.py -vv

Refs #6305

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 Dec 18, 2025
@not522 not522 added this to the v4.7.0 milestone Dec 18, 2025
@not522 not522 merged commit 65daad4 into optuna:master Dec 18, 2025
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