1 2 3 4 5 6 7 8 9 10 11
class AsyncContextManager: def __aenter__(self): pass def __aexit__(self, *exc): pass async def foo(): async with AsyncContextManager(): pass