class documentation

A parser that warns when unknown options are used. It must be created with a reference to the ArgumentParser object, so like:

    parser = ArgumentParser(
        prog='mysoft',
        config_file_parser_class=ConfigParser,)

    # Add the validator to the config file parser, this is arguably a hack.
    parser._config_file_parser = ValidatorParser(parser._config_file_parser, parser)
Note
Using this parser implies acting like ArgumentParser's option ignore_unknown_config_file_keys=True. So no need to explicitely mention it.
Method __init__ Undocumented
Method get_syntax_description Undocumented
Method parse Undocumented
Instance Variable argument_parser Undocumented
Instance Variable config_parser Undocumented
def __init__(self, config_parser: ConfigFileParser, argument_parser: ArgumentParser): (source)

Undocumented

def get_syntax_description(self) -> str: (source)

Undocumented

def parse(self, stream: TextIO) -> dict[str, Any]: (source)

Undocumented

argument_parser = (source)

Undocumented

config_parser = (source)

Undocumented