[red-knot] Autoformat mdtest Python snippets using blacken-docs (#13809)

This commit is contained in:
Alex Waygood
2024-10-19 15:57:06 +01:00
committed by GitHub
parent 2ff36530c3
commit 36cb1199cc
45 changed files with 331 additions and 132 deletions

View File

@@ -6,6 +6,7 @@
def get_int() -> int:
return 42
reveal_type(get_int()) # revealed: int
```
@@ -15,6 +16,7 @@ reveal_type(get_int()) # revealed: int
async def get_int_async() -> int:
return 42
# TODO: we don't yet support `types.CoroutineType`, should be generic `Coroutine[Any, Any, int]`
reveal_type(get_int_async()) # revealed: @Todo
```
@@ -24,15 +26,19 @@ reveal_type(get_int_async()) # revealed: @Todo
```py
from typing import Callable
def foo() -> int:
return 42
def decorator(func) -> Callable[[], int]:
return foo
@decorator
def bar() -> str:
return 'bar'
return "bar"
# TODO: should reveal `int`, as the decorator replaces `bar` with `foo`
reveal_type(bar()) # revealed: @Todo