Use the | dict union instead of ** unpacking

Proprietary

Dict literals made up entirely of ** unpacking can be rewritten with the | union operator available since Python 3.9. Only a literal whose every operand's type resolves to dict is rewritten, since | on a subclass such as Counter or on another mapping behaves differently.

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

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