Skip to content

Replace .format() with f-string in _rank.py#6409

Merged
not522 merged 1 commit intooptuna:masterfrom
jwalith:fix-format-rank-py
Jan 14, 2026
Merged

Replace .format() with f-string in _rank.py#6409
not522 merged 1 commit intooptuna:masterfrom
jwalith:fix-format-rank-py

Conversation

@jwalith
Copy link
Copy Markdown
Contributor

@jwalith jwalith commented Jan 11, 2026

Motivation

Addressing (#6305 for compatibility.)

Description of the changes

Replaced the .format() call with f-string on line 131 in optuna/visualization/_rank.py with an f-string using the preferred {var_name=} syntax.

- Changed line 131 from .format() to f-string
- Related to issue optuna#6305
@not522 not522 changed the title Replace .format() with f-string in _rank.py Replace .format() with f-string in _rank.py Jan 14, 2026
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 Jan 14, 2026
@not522 not522 added this to the v4.7.0 milestone Jan 14, 2026
@not522 not522 merged commit f4e630d into optuna:master Jan 14, 2026
15 checks passed
@jwalith
Copy link
Copy Markdown
Contributor Author

jwalith commented Jan 14, 2026

Thank you, Really appreciate the thought of keeping one file per contributor. It allows new contributors like me to start our open source journey.

@jwalith jwalith deleted the fix-format-rank-py branch January 14, 2026 03:51
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