confusing-with-statement / W0124#
Following "as" with another context manager looks like a tuple.
Emitted when a `with` statement component returns multiple values and uses name binding with `as` only for a part of those values, as in with ctx() as a, b. This can be misleading, since it's not clear if the context manager returns a tuple or if the node without a name binding is another context manager.
with open('file.txt', 'w') as fh1, fh2: # [confusing-with-statement] pass
with open('file.txt', 'w', encoding="utf8") as fh1: with open('file.txt', 'w', encoding="utf8") as fh2: pass
Created by the basic checker.