mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 11:02:20 +00:00
Add typecheck for 'add_help' property
This commit is contained in:
@@ -153,6 +153,8 @@ local function boundaries(name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local add_help = {"add_help", function(self, value)
|
local add_help = {"add_help", function(self, value)
|
||||||
|
typecheck("add_help", {"boolean", "string", "table"}, value)
|
||||||
|
|
||||||
if self._has_help then
|
if self._has_help then
|
||||||
table.remove(self._options)
|
table.remove(self._options)
|
||||||
self._has_help = false
|
self._has_help = false
|
||||||
|
Reference in New Issue
Block a user