Merge nested with statements into one
ProprietaryCombine directly nested with statements into a single with when the outer body contains only the inner with. An async with is left alone, as is a comment between the two, an outer with holding other statements, and a pair whose context managers the merge would leave split across lines outside parentheses.
org. openrewrite. python. cleanup. MergeNestedWithStatementsmod run . --recipe= org. openrewrite. python. cleanup. MergeNestedWithStatementsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.