mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-25 22:29:02 +00:00
[ty] Understand classes that inherit from subscripted Protocol[] as generic (#17832)
This commit is contained in:
parent
2370297cde
commit
d1bb10a66b
35 changed files with 451 additions and 183 deletions
|
|
@ -79,8 +79,7 @@ lambda x=1: reveal_type(x) # revealed: Unknown | Literal[1]
|
|||
Using a variadic parameter:
|
||||
|
||||
```py
|
||||
# TODO: should be `tuple[Unknown, ...]` (needs generics)
|
||||
lambda *args: reveal_type(args) # revealed: tuple
|
||||
lambda *args: reveal_type(args) # revealed: tuple[Unknown, ...]
|
||||
```
|
||||
|
||||
Using a keyword-variadic parameter:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue