Drop redundant .keys() on dict iteration

Proprietary

Dictionaries iterate over their keys by default, making explicit .keys() calls unnecessary in for-loops and in expressions. Only a .keys() that is itself the loop's iterable or the right operand of in is removed, and only where the receiver's type resolves to dict.

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

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