[red-knot] Autoformat mdtest Python snippets using blacken-docs (#13809)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user