Skip to content

Commit 5b689d7

Browse files
committed
🐛 fix the FixTrailingComma codemod
1 parent c95437a commit 5b689d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codegen/mods.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ class FixTrailingComma(_BaseMod):
101101

102102
@override
103103
def leave_FunctionDef(self, /, original_node: cst.FunctionDef, updated_node: cst.FunctionDef) -> cst.FunctionDef:
104-
params = updated_node.params.params
104+
params_node = updated_node.params
105+
params = *params_node.posonly_params, *params_node.params, *params_node.kwonly_params
105106

106107
if (
107108
# the parameters start on a new line

0 commit comments

Comments
 (0)