PY3.E1129
Not context manager
Used when an instance in a with statement doesn't implement the context manager protocol( enter / exit ).
Noncompliant Code:
Copy
class Ctx:
def __enter__(self):
pass
with Ctx() as ctx:
pass
Compliant Code:
Copy
class Ctx:
def __enter__(self):
pass
def __exit__(self, *exc):
pass
with Ctx() as ctx:
pass