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