mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
[ty] Understand homogeneous tuple annotations (#17998)
This commit is contained in:
parent
f301931159
commit
55df9271ba
17 changed files with 196 additions and 104 deletions
|
@ -56,13 +56,12 @@ reveal_type(a) # revealed: tuple[()]
|
|||
reveal_type(b) # revealed: tuple[int]
|
||||
reveal_type(c) # revealed: tuple[str, int]
|
||||
reveal_type(d) # revealed: tuple[tuple[str, str], tuple[int, int]]
|
||||
reveal_type(e) # revealed: tuple[str, ...]
|
||||
|
||||
reveal_type(f) # revealed: @Todo(PEP 646)
|
||||
reveal_type(g) # revealed: @Todo(PEP 646)
|
||||
|
||||
# TODO: homogeneous tuples, PEP-646 tuples, generics
|
||||
reveal_type(e) # revealed: @Todo(full tuple[...] support)
|
||||
reveal_type(f) # revealed: @Todo(full tuple[...] support)
|
||||
reveal_type(g) # revealed: @Todo(full tuple[...] support)
|
||||
reveal_type(h) # revealed: tuple[list[int], list[int]]
|
||||
|
||||
reveal_type(i) # revealed: tuple[str | int, str | int]
|
||||
reveal_type(j) # revealed: tuple[str | int]
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue