Skip to content

Commit cb1f384

Browse files
authored
Python nested function fix - inner functions do not strip their first parameter (#151)
1 parent d8c8145 commit cb1f384

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lua/neogen/configurations/python.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ return {
204204
if decorator == "@staticmethod" then
205205
remove_identifier = false
206206
end
207+
elseif node:parent():parent():type() == "function_definition" then
208+
remove_identifier = false
207209
end
210+
208211
if remove_identifier then
209212
table.remove(res[i.Parameter], 1)
210213
if vim.tbl_isempty(res[i.Parameter]) then

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.1"
302+
neogen.version = "2.15.2"
303303
--minidoc_afterlines_end
304304

305305
return neogen

0 commit comments

Comments
 (0)