Deduplicate repeated elements in set literals

Proprietary

Set literals with repeated values have redundant entries that are discarded at runtime. This removes the duplicates, keeping the first one, which is the one the set holds. Unpacked elements and elements carrying comments are left alone.

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

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