Skip to content

Refactor __repr__ in trial/_frozen.py to use f-strings#6485

Merged
not522 merged 3 commits intooptuna:masterfrom
Bhavyag1337:master
Mar 2, 2026
Merged

Refactor __repr__ in trial/_frozen.py to use f-strings#6485
not522 merged 3 commits intooptuna:masterfrom
Bhavyag1337:master

Conversation

@Bhavyag1337
Copy link
Copy Markdown
Contributor

  • Refactored string formatting in optuna/trial/_frozen.py from str.format() to f-strings for readability.
  • Kept the output of repr unchanged.

@Bhavyag1337 Bhavyag1337 reopened this Feb 27, 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 changed the title Refactor __repr__ in trial/_frozen.py to use f-strings Refactor __repr__ in trial/_frozen.py to use f-strings Mar 2, 2026
@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Mar 2, 2026
@not522 not522 added this to the v4.8.0 milestone Mar 2, 2026
@not522 not522 merged commit 86e7bf1 into optuna:master Mar 2, 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.

2 participants