Standardize instance method first parameter to self
ProprietaryEnsure 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. InstanceMethodFirstArgNamemod run . --recipe= org. openrewrite. python. cleanup. InstanceMethodFirstArgNameInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.