Drop default slice boundaries
ProprietaryRewrite seq[0:len(seq)] as seq[:]. It only fires where seq is a side-effect-free name whose type resolves to a builtin sequence such as list or str, and where len is the builtin. A slice with a step is left alone.
org. openrewrite. python. cleanup. RemoveRedundantSliceIndexmod run . --recipe= org. openrewrite. python. cleanup. RemoveRedundantSliceIndexInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.