Merge isinstance() calls

Proprietary

Merge isinstance(x, A) or isinstance(x, B) into isinstance(x, (A, B)). Calls whose arguments may have side effects, a shadowed isinstance, and an or with comments inside are left alone.

org.openrewrite.python.cleanup.MergeIsinstance
mod run . --recipe=org.openrewrite.python.cleanup.MergeIsinstance

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.