def update_parser(self, parser):
        """Update config dictionary with declared arguments in an argparse.parser
        New variables will be created, and existing ones overridden.

        Args:
            parser (argparse.ArgumentParser): parser to read variables from

        """

        self._parser = parser
        ini_str = argparse_to_ini(parser)
        configp = configparser.ConfigParser(allow_no_value=True)
        configp.read_dict(self._config)
        configp.read_string(ini_str)
        self._config.update(
            {s: dict(configp.items(s))
             for s in configp.sections()}
        )
def update_parser ( self , parser ) : self . _parser = parser ini_str = argparse_to_ini ( parser ) configp = configparser . ConfigParser ( allow_no_value = True ) configp . read_dict ( self . _config ) configp . read_string ( ini_str ) self . _config . update ( { s : dict ( configp . items ( s ) ) for s in configp . sections ( ) } )
Update config dictionary with declared arguments in an argparse.parser
        New variables will be created, and existing ones overridden.

        Args:
            parser (argparse.ArgumentParser): parser to read variables from