Skip to content

Commit

Permalink
feat: add trailing comma to python's parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Wansmer committed Nov 23, 2024
1 parent 3167330 commit db5ed98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lua/treesj/langs/python.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ return {
},
}),
argument_list = lang_utils.set_preset_for_args(),
parameters = lang_utils.set_preset_for_args(),
parameters = lang_utils.set_preset_for_args({
split = { last_separator = true },
}),
parenthesized_expression = lang_utils.set_preset_for_args({}),
list_comprehension = lang_utils.set_preset_for_args(),
set_comprehension = lang_utils.set_preset_for_args(),
Expand Down
2 changes: 1 addition & 1 deletion tests/sample/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def adder(y):
# RESULT OF SPLIT (node "parameters" and "function_definition", preset default)
def create_adder(
x,
b
b,
):
def adder(y):
return x + y
Expand Down

0 comments on commit db5ed98

Please sign in to comment.