Strip dead code after terminal statements
ProprietaryDelete statements that follow a return, raise, continue, or break in the same block, since they can never execute. Dead code is kept where it holds a comment or a yield, or binds a name the function reads elsewhere, since either makes the function behave differently.
org. openrewrite. python. cleanup. RemoveUnreachableCodemod run . --recipe= org. openrewrite. python. cleanup. RemoveUnreachableCodeInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.