Remove trailing return None from functions

Proprietary

Delete return None or a bare return when it is the last statement in a function body and no other return yields a non-None value. A return holding a comment is kept, as is one that is the function's only statement.

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

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