mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-28 18:53:25 +00:00
## Summary Use the declared type of variables as type context for the RHS of assignment expressions, e.g., ```py x: list[int | str] x = [1] reveal_type(x) # revealed: list[int | str] ``` |
||
|---|---|---|
| .. | ||
| boolean.md | ||
| elif_else.md | ||
| eq.md | ||
| in.md | ||
| is.md | ||
| is_not.md | ||
| nested.md | ||
| not.md | ||