parameters: (config_string)
return_statement: return config
docstring: Given a config string from the command line, return a config parser.
docstring_summary: Given a config string from the command line, return a config parser.
docstring_tokens: Given a config string from the command line return a config parser .
function: def _CreateConfigParserFromConfigString(config_string):
    """Given a config string from the command line, return a config parser."""
    if config_string[0] != '{' or config_string[-1] != '}':
      raise StyleConfigError(
          "Invalid style dict syntax: '{}'.".format(config_string))
    config = py3compat.ConfigParser()
    config.add_section('style')
    for key, value in re.findall(r'([a-zA-Z0-9_]+)\s*[:=]\s*([a-zA-Z0-9_]+)',
                                 config_string):
      config.set('style', key, value)
    return config
function_tokens: def _CreateConfigParserFromConfigString ( config_string ) : if config_string [ 0 ] != '{' or config_string [ - 1 ] != '}' : raise StyleConfigError ( "Invalid style dict syntax: '{}'." . format ( config_string ) ) config = py3compat . ConfigParser ( ) config . add_section ( 'style' ) for key , value in re . findall ( r'([a-zA-Z0-9_]+)\s*[:=]\s*([a-zA-Z0-9_]+)' , config_string ) : config . set ( 'style' , key , value ) return config