Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.2k
Refactor cli.py to use f-string#6359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
Replace .format() with f-string for version string formattingfollowing modern Python conventions.Fixesoptuna#6305
c-bata left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM. Sorry, I've just noticed that CI was failed.
c-bata left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@cnaples79 Could you run ruff formatter?
This pull request has not seen any recent activity. |
Summary
.format()with f-string incli.pyfor version string formattingChanges Made
optuna/cli.py"{0} {1}".format("optuna", optuna.__version__)tof"optuna {optuna.__version__}"Rationale
This change simplifies string formatting and improves code readability by using Python's f-string syntax instead of the older
.format()method. This is part of the codebase-wide refactoring initiative to modernize string formatting.Fixes#6305