Skip to content

Use f-string in tutorial/10_key_features/005_visualization.py - #6489

Merged
not522 merged 1 commit into
optuna:masterfrom
maheer14:fix/f-strings-visualization
Mar 4, 2026
Merged

not522 merged 1 commit into
optuna:masterfrom
maheer14:fix/f-strings-visualization

Conversation

@maheer14

@maheer14 maheer14 commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

This PR addresses the good first issue to modernize string formatting across the Optuna codebase, specifically replacing older syntax with cleaner f-strings as requested in #6305.

Description of the changes

  • Updated tutorial/10_key_features/005_visualization.py to use an f-string instead of .format().

Fixes #6305

@not522 not522 left a comment

Copy link
Copy Markdown
Member

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 4, 2026
@not522 not522 changed the title Refactor: Use f-string in tutorial/10_key_features/005_visualization.py Use f-string in tutorial/10_key_features/005_visualization.py Mar 4, 2026
@not522 not522 added this to the v4.8.0 milestone Mar 4, 2026
@not522
not522 merged commit a8ee90e into optuna:master Mar 4, 2026
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.

Use f-string and {var_name=} instead of .format and var_name={var_name}

2 participants