From 002e98d8019a76e9f7b1dbc62ec2dd17b9209dba Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 29 Aug 2024 08:18:10 +0200 Subject: [PATCH] get path --- tiramisu_cmdline_parser/api.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tiramisu_cmdline_parser/api.py b/tiramisu_cmdline_parser/api.py index e62ccc9..32a7363 100644 --- a/tiramisu_cmdline_parser/api.py +++ b/tiramisu_cmdline_parser/api.py @@ -600,15 +600,17 @@ class TiramisuCmdlineParser(ArgumentParser): else: pass actions.setdefault(option.name(), []).append(kwargs) + for option_is_not_default in options_is_not_default.values(): self._option_is_not_default(**option_is_not_default) for values in actions.values(): for value in values: args, kwargs = value.get() group.add_argument(*args, **kwargs) - def _valid_mandatory(self): - pass +# def _valid_mandatory(self): +# pass +# def parse_args(self, *args, valid_mandatory=True, @@ -617,7 +619,7 @@ class TiramisuCmdlineParser(ArgumentParser): try: namespaces = super().parse_args(*args, **kwargs) except PropertiesOptionError as err: - name = err._option_bag.option.impl_getname() + name = err._subconfig.path properties = self.config.option(name).property.get() if self.fullpath and 'positional' not in properties: if len(name) == 1 and 'longargument' not in properties: