Skip to content

Use f-strings in _contour.py#6436

Merged
not522 merged 2 commits intooptuna:masterfrom
edwiniac:fix/fstring-visualization-contour
Feb 13, 2026
Merged

Use f-strings in _contour.py#6436
not522 merged 2 commits intooptuna:masterfrom
edwiniac:fix/fstring-visualization-contour

Conversation

@edwiniac
Copy link
Copy Markdown
Contributor

Description

Addresses #6305

This PR converts .format() calls to f-strings in optuna/visualization/_contour.py for cleaner, more readable code.

Changes

  • Converted 3 .format() usages to f-strings
  • Used !r for parameter names to show them quoted in output

Checklist

  • One file only (as requested in the issue)
  • Uses f-strings

edwiniac and others added 2 commits February 12, 2026 16:34
Addresses optuna#6305

Converted .format() calls to f-strings for cleaner, more readable code.
@not522 not522 changed the title Use f-strings in optuna/visualization/_contour.py Use f-strings in _contour.py Feb 13, 2026
@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Feb 13, 2026
@not522 not522 added this to the v4.8.0 milestone Feb 13, 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!
To minimize differences, I've removed !r.

@not522 not522 enabled auto-merge February 13, 2026 03:22
@not522 not522 merged commit acc6d53 into optuna:master Feb 13, 2026
14 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