[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-22 Thread rive_n
rive_n added the comment: Long time no updates here. Another fix. In past version more than 1 argument could not be parsed. Fix (finally with unittests): ```python3 def __call__(self, parser, namespace, values, option_string=None, arg_strings_pattern:list =None): o_amount =

[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-18 Thread rive_n
rive_n added the comment: Hi again. previous solution with: ```python3 try: namespace, args = self._parse_known_args(args, namespace) if hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR): args.extend(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR))

[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-17 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: -pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-17 Thread rive_n
rive_n added the comment: Let's say we have default parser configuration: https://docs.python.org/3/library/argparse.html#other-utilities Like this one: ```python3 import argparse parser = argparse.ArgumentParser(prog='PROG') parser.add_argument('--foo', action='store_true', help='foo

[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-17 Thread rive_n
New submission from rive_n : Let's say we have default parser configuration: https://docs.python.org/3/library/argparse.html#other-utilities Like this one: ```python3 import argparse parser = argparse.ArgumentParser(prog='PROG') parser.add_argument('--foo', action='store_true', help='foo