Replace zip(d.keys(), d.values()) with d.items()
ProprietaryWhen both .keys() and .values() are zipped together, replace with .items() which yields key-value pairs directly. Only a zip that a for-loop or comprehension iterates directly is replaced, and only where the receiver is a name or attribute read whose type resolves to dict. A zip holding comments is left alone.
org. openrewrite. python. cleanup. UseItemsForKeyValueIterationmod run . --recipe= org. openrewrite. python. cleanup. UseItemsForKeyValueIterationInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.