mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:51:30 +00:00
Rename Red Knot (#17820)
This commit is contained in:
parent
e6a798b962
commit
b51c4f82ea
1564 changed files with 1598 additions and 1578 deletions
|
@ -0,0 +1,7 @@
|
|||
# Dictionaries
|
||||
|
||||
## Empty dictionary
|
||||
|
||||
```py
|
||||
reveal_type({}) # revealed: dict[Unknown, Unknown]
|
||||
```
|
|
@ -0,0 +1,7 @@
|
|||
# Lists
|
||||
|
||||
## Empty list
|
||||
|
||||
```py
|
||||
reveal_type([]) # revealed: list
|
||||
```
|
|
@ -0,0 +1,7 @@
|
|||
# Sets
|
||||
|
||||
## Basic set
|
||||
|
||||
```py
|
||||
reveal_type({1, 2}) # revealed: set
|
||||
```
|
|
@ -0,0 +1,17 @@
|
|||
# Tuples
|
||||
|
||||
## Empty tuple
|
||||
|
||||
```py
|
||||
reveal_type(()) # revealed: tuple[()]
|
||||
```
|
||||
|
||||
## Heterogeneous tuple
|
||||
|
||||
```py
|
||||
reveal_type((1, "a")) # revealed: tuple[Literal[1], Literal["a"]]
|
||||
|
||||
reveal_type((1, (2, 3))) # revealed: tuple[Literal[1], tuple[Literal[2], Literal[3]]]
|
||||
|
||||
reveal_type(((1, "a"), 2)) # revealed: tuple[tuple[Literal[1], Literal["a"]], Literal[2]]
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue