Skip to content

Quote cast type expression in tests/test_distributions.py - #6543

Merged
not522 merged 1 commit into
optuna:masterfrom
t7r0n:fix/type-checking-tests-distributions-6029
Mar 23, 2026
Merged

not522 merged 1 commit into
optuna:masterfrom
t7r0n:fix/type-checking-tests-distributions-6029

Conversation

@t7r0n

@t7r0n t7r0n commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • quote the type expression in typing.cast in tests/test_distributions.py to satisfy Ruff TC006
  • keep runtime behavior unchanged

Motivation

Testing

  • uv run ruff check tests/test_distributions.py --select TCH
  • uv run ruff check tests/test_distributions.py
  • uv run ruff format --check tests/test_distributions.py
  • uv run mypy tests/test_distributions.py
  • uv run pytest tests/test_distributions.py -q

Part of #6029

@not522 not522 left a comment

Copy link
Copy Markdown
Member

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 Mar 23, 2026
@not522 not522 added this to the v4.9.0 milestone Mar 23, 2026
@not522
not522 merged commit a2458c7 into optuna:master Mar 23, 2026
13 checks passed
@not522 not522 changed the title test: quote cast type expression in tests/test_distributions.py Quote cast type expression in tests/test_distributions.py Mar 23, 2026
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