From 150fa8e75ca49edaadb4240ffff4ce36d94c8da7 Mon Sep 17 00:00:00 2001 From: mpeterv Date: Thu, 15 Jan 2015 15:44:41 +0300 Subject: [PATCH] Fixed some luacheck warnings --- src/argparse.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/argparse.lua b/src/argparse.lua index 1de3e72..da0df8e 100644 --- a/src/argparse.lua +++ b/src/argparse.lua @@ -221,7 +221,7 @@ do -- Create classes with setters end end - local function convert(self, value) + local function convert(_, value) if type(value) ~= "function" then if type(value) ~= "table" then error(("bad field 'convert' (function or table expected, got %s)"):format(type(value))) @@ -229,7 +229,7 @@ do -- Create classes with setters end end - local function argname(self, value) + local function argname(_, value) if type(value) ~= "string" then if type(value) ~= "table" then error(("bad field 'argname' (string or table expected, got %s)"):format(type(value))) @@ -783,7 +783,7 @@ function Parser:_parse(args, errhandler) if type(element._convert) == "function" then ok, err = element._convert(data) else - ok, err = element._convert[data] + ok = element._convert[data] end assert_(ok ~= nil, "%s", err or "malformed argument '" .. data .. "'")