diff --git a/crates/ty_python_semantic/resources/mdtest/async.md b/crates/ty_python_semantic/resources/mdtest/async.md index 416c88b09c..1b9b16f827 100644 --- a/crates/ty_python_semantic/resources/mdtest/async.md +++ b/crates/ty_python_semantic/resources/mdtest/async.md @@ -82,6 +82,24 @@ async def main(): reveal_type(b) # revealed: int ``` +### `asynccontextmanager` + +```py +from contextlib import asynccontextmanager +from typing import AsyncGenerator + +class Session: ... + +@asynccontextmanager +async def connect() -> AsyncGenerator[Session]: + yield Session() + +async def main(): + async with connect() as session: + # TODO: should be `Session` + reveal_type(session) # revealed: Unknown +``` + ## Under the hood ```toml