1 2 3 4 5 6 7
class MyContextManager: def __enter__(self): pass with MyContextManager() as c: # [not-context-manager] pass