Skip to content

Cannot supply enabled_if parameters in CLI #18

@dpaleka

Description

@dpaleka

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: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions