mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +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
|
@ -3,5 +3,5 @@
|
|||
## Empty list
|
||||
|
||||
```py
|
||||
reveal_type([]) # revealed: list
|
||||
reveal_type([]) # revealed: list[Unknown]
|
||||
```
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
## Basic set
|
||||
|
||||
```py
|
||||
reveal_type({1, 2}) # revealed: set
|
||||
reveal_type({1, 2}) # revealed: set[Unknown]
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue