The optional_bool type needs const=True and nargs='?'
@@ -91,6 +91,8 @@ def add_arguments(parser: KGTKArgumentParser):
"--generate-truthy",
type=optional_bool,
metavar="True|False",
+ nargs='?',
+ const=True,
default=True,
help="the default is to not generate truthy triples. Specify this option to generate truthy triples.",
dest="truthy",
@@ -99,6 +101,8 @@ def add_arguments(parser: KGTKArgumentParser):
"-w",
"--warning",
type=optional_bool,
+ nargs='?',
+ const=True,
default=False,
metavar="True|False",
help="if specified, "
@@ -111,6 +115,8 @@ def add_arguments(parser: KGTKArgumentParser):
"--use-gz",
type=optional_bool,
metavar="True|False",
+ nargs='?',
+ const=True,
default=False,
help="if set to yes, read from compressed gz file",
dest="use_gz",
@@ -120,6 +126,8 @@ def add_arguments(parser: KGTKArgumentParser):
"--use-id",
type=optional_bool,
metavar="True|False",
+ nargs='?',
+ const=True,
default=False,
help="if set to yes, the id in the edge will be used as statement id when creating statement or truthy statement",
dest="use_id",
