Remove unnecessary assignment before return
ProprietaryReturn the value directly where a variable is assigned and then immediately returned. A name that appears anywhere else in the function, a yield value, and a comment before the return are left alone.
org. openrewrite. python. cleanup. RemoveUnnecessaryAssignmod run . --recipe= org. openrewrite. python. cleanup. RemoveUnnecessaryAssignInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.