Fixed some luacheck warnings

This commit is contained in:
mpeterv
2015-01-15 15:44:41 +03:00
parent 002db5a133
commit 150fa8e75c

View File

@@ -221,7 +221,7 @@ do -- Create classes with setters
end end
end end
local function convert(self, value) local function convert(_, value)
if type(value) ~= "function" then if type(value) ~= "function" then
if type(value) ~= "table" then if type(value) ~= "table" then
error(("bad field 'convert' (function or table expected, got %s)"):format(type(value))) error(("bad field 'convert' (function or table expected, got %s)"):format(type(value)))
@@ -229,7 +229,7 @@ do -- Create classes with setters
end end
end end
local function argname(self, value) local function argname(_, value)
if type(value) ~= "string" then if type(value) ~= "string" then
if type(value) ~= "table" then if type(value) ~= "table" then
error(("bad field 'argname' (string or table expected, got %s)"):format(type(value))) 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 if type(element._convert) == "function" then
ok, err = element._convert(data) ok, err = element._convert(data)
else else
ok, err = element._convert[data] ok = element._convert[data]
end end
assert_(ok ~= nil, "%s", err or "malformed argument '" .. data .. "'") assert_(ok ~= nil, "%s", err or "malformed argument '" .. data .. "'")