Files
ruff/crates/ty_python_semantic/resources/mdtest/hover_simple.md
Douglas Creager 847e5f0c68 [ty] Handle expression statements in hover type inference
When hovering, if we find a statement node (like StmtExpr), extract the
expression from within it. This allows hover assertions to work on
standalone expressions like variable references.

Also add a simple working mdtest to demonstrate hover assertions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 15:08:23 -04:00

378 B

Simple hover test

Testing basic hover functionality with simple cases.

# Test 1: Simple variable with longer name
my_value = 10
#↓ hover: Literal[10]
my_value

# Test 2: Try hovering directly on the number literal
#          ↓ hover: Literal[10]
some_var = 10

# Test 3: Variable reference with longer name
another_var = 42
#↓ hover: Literal[42]
another_var