1 2 3 4 5 6 7 8 9 10 11
class ContextManager: def __enter__(self): pass def __exit__(self, *exc): pass async def foo(): async with ContextManager(): # [not-async-context-manager] pass