Skip to content

Fix TC006 violation in tests/visualization_tests/test_utils.py#6387

Merged
sawa3030 merged 1 commit intooptuna:masterfrom
jiayusu:master
Dec 18, 2025
Merged

Fix TC006 violation in tests/visualization_tests/test_utils.py#6387
sawa3030 merged 1 commit intooptuna:masterfrom
jiayusu:master

Conversation

@jiayusu
Copy link
Copy Markdown
Contributor

@jiayusu jiayusu commented Dec 15, 2025

Motivation

This PR fixes a TC006 violation reported by flake8-type-checking in the visualization test.

Using a string literal in typing.cast() follows the recommended typing practice
and avoids unnecessary runtime dependencies.

Description of the changes

  • Replace the concrete type annotation in typing.cast() with a string literal in a visualization test.
  • No functional behavior is changed.

Copy link
Copy Markdown
Member

@y0z y0z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@y0z
Copy link
Copy Markdown
Member

y0z commented Dec 16, 2025

@sawa3030 Could you review this PR?

@y0z y0z added the test Unit test. label Dec 16, 2025
@y0z y0z added this to the v4.7.0 milestone Dec 16, 2025
Copy link
Copy Markdown
Collaborator

@sawa3030 sawa3030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. LGTM!

@sawa3030 sawa3030 merged commit 8a4a3d3 into optuna:master Dec 18, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Unit test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants