Deduplicate repeated keys in dict literals

Proprietary

When a dict literal contains the same key more than once, only the final value survives at runtime. This removes the shadowed entries. An entry is only removed where its duplicate directly follows it, so the key keeps its position, and where its value has no side effects and it carries no comments.

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

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