Skip to content

Commit 2f15416

Browse files
committed
fix(py): Only count first identifier in default_parameter (fix #148)
Default parameters such as: ```python def test(foo=delimiter): pass ``` where counting `delimiter` as Parameters. To fix that, I only return the first child in a `default_parameter` tree
1 parent a9f560b commit 2f15416

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/neogen/configurations/python.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ return {
7474
node_type = "default_parameter",
7575
subtree = {
7676
{
77-
retrieve = "all",
77+
position = 1,
7878
node_type = "identifier",
7979
extract = true,
8080
as = i.Parameter,

lua/neogen/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ end
299299
--- with multiple annotation conventions.
300300
---@tag neogen-changelog
301301
---@toc_entry Changes in neogen plugin
302-
neogen.version = "2.15.0"
302+
neogen.version = "2.15.1"
303303
--minidoc_afterlines_end
304304

305305
return neogen

0 commit comments

Comments
 (0)