In the first iteration of the loop in Config.augment_argparse(), parameters in sections defined with enable_if are skipped:
|
if not param.section.is_enabled(self): |
|
continue |
However, all command line arguments are then passed to the parser:
|
self.collect_argparse_args(parser, disable_help=True) |
|
args = parser.parse_args(cli_args) |
The
parser.add_argument() call has not happened yet, so the parser will exit with
error: unrecognized arguments: ...
In the first iteration of the loop in
Config.augment_argparse(), parameters in sections defined withenable_ifare skipped:fastargs/fastargs/config.py
Lines 80 to 81 in b39083a
However, all command line arguments are then passed to the parser:
fastargs/fastargs/config.py
Line 103 in b39083a
fastargs/fastargs/config.py
Line 148 in b39083a
The
parser.add_argument()call has not happened yet, so the parser will exit witherror: unrecognized arguments: ...