mirror of
https://github.com/astral-sh/ruff
synced 2026-01-23 14:30:53 -05:00
## Summary Porting infer tests to new markdown tests framework. Link to the corresponding issue: #13696 --------- Co-authored-by: Carl Meyer <carl@astral.sh>
228 B
228 B
Walrus operator
Basic
x = (y := 1) + 1
reveal_type(x) # revealed: Literal[2]
reveal_type(y) # revealed: Literal[1]
Walrus self-addition
x = 0
(x := x + 1)
reveal_type(x) # revealed: Literal[1]