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('([a-zA-Z0-9_]+)\\s*[:=]\\s*([a-zA-Z0-9_]+)', config_string):
  config.set('style', key, value)
 return config

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 ( '([a-zA-Z0-9_]+)\\s*[:=]\\s*([a-zA-Z0-9_]+)' , config_string ) : config . set ( 'style' , key , value ) return config
given a config string from the command line .