Skip to content

Commit a3eda8e

Browse files
committed
fix docstrings
1 parent 89e6fd2 commit a3eda8e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/sagemaker/cli/compatibility/v2/modifiers/renamed_params.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,26 @@ def modify_node(self, node):
6969

7070

7171
class MethodParamRenamer(ParamRenamer):
72-
"""Abstract class to handle parameter renames for methods that belong to objects."""
72+
"""Abstract class to handle parameter renames for methods that belong to objects.
73+
74+
This differs from ``ParamRenamer`` in that a node for a standalone function call
75+
(i.e. where ``node.func`` is an ``ast.Name`` rather than an ``ast.Attribute``) is not modified.
76+
"""
7377

7478
def node_should_be_modified(self, node):
7579
"""Checks if the node matches any of the relevant functions and
7680
contains the parameter to be renamed.
7781
7882
This looks for a call of the form ``<object>.<method>``, and
7983
assumes the method cannot be called on its own.
84+
85+
Args:
86+
node (ast.Call): a node that represents a function call. For more,
87+
see https://docs.python.org/3/library/ast.html#abstract-grammar.
88+
89+
Returns:
90+
bool: If the ``ast.Call`` matches the relevant function calls and
91+
contains the parameter to be renamed.
8092
"""
8193
if isinstance(node.func, ast.Name):
8294
return False

0 commit comments

Comments
 (0)