From ff0e8eaf83d125e5709439f0e3142a1619201d2d Mon Sep 17 00:00:00 2001 From: danymat Date: Fri, 7 Jan 2022 17:42:47 +0100 Subject: [PATCH] fix(python) Don't show error for empty class (#33) --- lua/neogen/configurations/python.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/neogen/configurations/python.lua b/lua/neogen/configurations/python.lua index ae33e01..55ba4da 100644 --- a/lua/neogen/configurations/python.lua +++ b/lua/neogen/configurations/python.lua @@ -85,6 +85,10 @@ return { local nodes = neogen.utilities.nodes:matching_nodes_from(node, tree) + if vim.tbl_isempty(nodes) then + return {} + end + results.attributes = {} for _, assignment in pairs(nodes["assignment"]) do local left_side = assignment:field("left")[1]