Standardize instance method first parameter to self

Proprietary

Ensure instance methods use self as their first parameter per PEP 8 and rename its references in the body. It leaves alone methods decorated with @staticmethod or @classmethod, functions nested in a method, a first parameter named cls, a method that already uses self, and one that mentions the old name in an import or a nested function or class.

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

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