Skip to content

Replace .format() with f-string in _setup_studies#6326

Merged
nabenabe0928 merged 1 commit intooptuna:masterfrom
haitham404:fstring-test-storages
Nov 3, 2025
Merged

Replace .format() with f-string in _setup_studies#6326
nabenabe0928 merged 1 commit intooptuna:masterfrom
haitham404:fstring-test-storages

Conversation

@haitham404
Copy link
Copy Markdown

Motivation

Contributes to the ongoing effort in #6305 to replace old-style .format() calls with modern f-strings.

Description of the changes

Changes

  • Updated tests/storages_tests/test_storages.py
  • Replaced the single .format() usage in _setup_studies with an f-string:
- study_name = "test-study-name-{}".format(i)
+ study_name = f"test-study-name-{i}"

@nabenabe0928 nabenabe0928 changed the title refactor: replace .format() with f-string in _setup_studies Replace .format() with f-string in _setup_studies Nov 3, 2025
Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

LGTM

@nabenabe0928 nabenabe0928 merged commit 4134167 into optuna:master Nov 3, 2025
13 checks passed
@nabenabe0928 nabenabe0928 added the code-fix Change that does not change the behavior, such as code refactoring. label Nov 3, 2025
@nabenabe0928 nabenabe0928 added this to the v4.7.0 milestone Nov 3, 2025
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