The https://docs.python.org/3/reference/compound_stmts.html#the-with-statement[``++with++`` statement] should only be used with https://docs.python.org/3/reference/datamodel.html#context-managers[context managers]. A context manager should have an ``++__enter__++`` and an ``++__exit__++`` method.
Note that only ``++async with++`` statements should be used on https://docs.python.org/3/reference/datamodel.html#async-context-managers[asynchronous context managers].
This rule raises an issue when a ``++with++`` statement is used on something else than a context manager.