From 9fcef7d473c0e6b2085b621a19e6be13689e3b01 Mon Sep 17 00:00:00 2001 From: Dani Alcala <112832187+clavedeluna@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:03:39 -0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Dan D'Avella --- src/core_codemods/docs/pixee_python_fix-missing-self-or-cls.md | 2 +- src/core_codemods/fix_missing_self_or_cls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_codemods/docs/pixee_python_fix-missing-self-or-cls.md b/src/core_codemods/docs/pixee_python_fix-missing-self-or-cls.md index cf63089de..b06bc5bf9 100644 --- a/src/core_codemods/docs/pixee_python_fix-missing-self-or-cls.md +++ b/src/core_codemods/docs/pixee_python_fix-missing-self-or-cls.md @@ -1,4 +1,4 @@ -Python instance methods must be defined with `self` as the first argument. Likewise, class methods must have `cls` as the first argument. This codemod will add these arguments the method/class method has no arguments defined. +Python instance methods must be defined with `self` as the first argument. Likewise, class methods must have `cls` as the first argument. This codemod will add these arguments when the method/class method has no arguments defined. Our changes look something like this: diff --git a/src/core_codemods/fix_missing_self_or_cls.py b/src/core_codemods/fix_missing_self_or_cls.py index eb6f9df21..e023ee9e3 100644 --- a/src/core_codemods/fix_missing_self_or_cls.py +++ b/src/core_codemods/fix_missing_self_or_cls.py @@ -80,7 +80,7 @@ def has_no_args(self, node: cst.FunctionDef) -> bool: metadata=Metadata( name="fix-missing-self-or-cls", review_guidance=ReviewGuidance.MERGE_WITHOUT_REVIEW, - summary="Fix Missing Positional Parameter for Instance and Class Methods", + summary="Add Missing Positional Parameter for Instance and Class Methods", references=[], ), transformer=LibcstTransformerPipeline(FixMissingSelfOrClsTransformer),