[red-knot] Autoformat mdtest Python snippets using blacken-docs (#13809)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
## Simple
|
||||
|
||||
```py
|
||||
s = 'abcde'
|
||||
s = "abcde"
|
||||
|
||||
reveal_type(s[0]) # revealed: Literal["a"]
|
||||
reveal_type(s[1]) # revealed: Literal["b"]
|
||||
@@ -14,7 +14,7 @@ a = s[8] # error: [index-out-of-bounds] "Index 8 is out of bounds for string `L
|
||||
reveal_type(a) # revealed: Unknown
|
||||
|
||||
b = s[-8] # error: [index-out-of-bounds] "Index -8 is out of bounds for string `Literal["abcde"]` with length 5"
|
||||
reveal_type(b) # revealed: Unknown
|
||||
reveal_type(b) # revealed: Unknown
|
||||
```
|
||||
|
||||
## Function return
|
||||
@@ -23,7 +23,8 @@ reveal_type(b) # revealed: Unknown
|
||||
def add(x: int, y: int) -> int:
|
||||
return x + y
|
||||
|
||||
a = 'abcde'[add(0, 1)]
|
||||
|
||||
a = "abcde"[add(0, 1)]
|
||||
# TODO: Support overloads... Should be `str`
|
||||
reveal_type(a) # revealed: @Todo
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user