mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-25 06:13:01 +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
|
|
@ -25,8 +25,7 @@ def f(a, b: int, c=1, d: int = 2, /, e=3, f: Literal[4] = 4, *args: object, g=5,
|
|||
reveal_type(f) # revealed: Literal[4]
|
||||
reveal_type(g) # revealed: Unknown | Literal[5]
|
||||
reveal_type(h) # revealed: Literal[6]
|
||||
# TODO: should be `tuple[object, ...]`
|
||||
reveal_type(args) # revealed: tuple[Unknown, ...]
|
||||
reveal_type(args) # revealed: tuple[object, ...]
|
||||
reveal_type(kwargs) # revealed: dict[str, str]
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue