From 0a5611d29a9d76b98fdb0e7048632b0512c651d0 Mon Sep 17 00:00:00 2001 From: meijieru Date: Wed, 8 Dec 2021 01:01:10 -0500 Subject: [PATCH 1/2] fix(python): jump for return --- lua/neogen/configurations/python.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neogen/configurations/python.lua b/lua/neogen/configurations/python.lua index 39b88de..004edc3 100644 --- a/lua/neogen/configurations/python.lua +++ b/lua/neogen/configurations/python.lua @@ -113,7 +113,7 @@ return { { nil, '""" $1 """', { no_results = true } }, { "parameters", "\t%s: $1", { before_first_item = { "", "Args:" } } }, { "attributes", "\t%s: $1", { before_first_item = { "", "Attributes: " } } }, - { "return_statement", "", { before_first_item = { "", "Returns: " } } }, + { "return_statement", "\t$1", { before_first_item = { "", "Returns: " } } }, { nil, "" }, { nil, '"""' }, }, @@ -122,7 +122,7 @@ return { { nil, '""" $1 """', { no_results = true } }, { "parameters", "%s: $1", { before_first_item = { "", "Parameters", "----------" } } }, { "attributes", "%s: $1", { before_first_item = { "", "Attributes", "----------" } } }, - { "return_statement", "", { before_first_item = { "", "Returns", "-------" } } }, + { "return_statement", "$1", { before_first_item = { "", "Returns", "-------" } } }, { nil, "" }, { nil, '"""' }, }, From e89760d89957a3c9d21300ec9b60a057943606ea Mon Sep 17 00:00:00 2001 From: meijieru Date: Wed, 8 Dec 2021 01:04:11 -0500 Subject: [PATCH 2/2] fix(python): no blank line after return --- lua/neogen/configurations/python.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/neogen/configurations/python.lua b/lua/neogen/configurations/python.lua index 004edc3..ae33e01 100644 --- a/lua/neogen/configurations/python.lua +++ b/lua/neogen/configurations/python.lua @@ -114,7 +114,6 @@ return { { "parameters", "\t%s: $1", { before_first_item = { "", "Args:" } } }, { "attributes", "\t%s: $1", { before_first_item = { "", "Attributes: " } } }, { "return_statement", "\t$1", { before_first_item = { "", "Returns: " } } }, - { nil, "" }, { nil, '"""' }, }, numpydoc = { @@ -123,7 +122,6 @@ return { { "parameters", "%s: $1", { before_first_item = { "", "Parameters", "----------" } } }, { "attributes", "%s: $1", { before_first_item = { "", "Attributes", "----------" } } }, { "return_statement", "$1", { before_first_item = { "", "Returns", "-------" } } }, - { nil, "" }, { nil, '"""' }, }, },