Given a list of config options of the form "<rule>.<option>=<value>", parses out the correct rule and option
        and sets the value accordingly in this factory object.
514206
def set_config_from_string_list(self, config_options):
        
        for config_option in config_options:
            try:
                config_name, option_value = config_option.split("=", 1)
                if not option_value:
                    raise ValueError()
                rule_name, option_name = config_name.split(".", 1)
                self.set_option(rule_name, option_name, option_value)
            except ValueError:  # raised if the config string is invalid
                raise LintConfigError(
                    u"'{0}' is an invalid configuration option. Use '<rule>.<option>=<value>'".format(config_option))
824408
function setConf(conf, name, value, msg) {
  if (conf[name] && conf[name] !== value) {
    console.warn(
        `Your protractor configuration specifies an option which is overwritten by Bazel: '${name}' ${msg}`);
  }
  conf[name] = value;
}
506888
void setValue(String optionValue) {
      if (StringUtils.isNullOrBlank(optionValue) && isBoolean()) {

         this.value = true;

      } else if (!StringUtils.isNullOrBlank(optionValue)) {

         if (Collection.class.isAssignableFrom(type)) {

            Class<?> genericType = field == null
                                   ? String.class
                                   : (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];
            this.value = Convert.convert(optionValue, type, genericType);

         } else if (Map.class.isAssignableFrom(type)) {

            Class<?> keyType = field == null
                               ? String.class
                               : (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];
            Class<?> valueType = field == null
                                 ? String.class
                                 : (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[1];
            this.value = Convert.convert(optionValue, type, keyType, valueType);

         } else {

            this.value = Convert.convert(optionValue, type);

         }

      }


   }
706817
def set_value_for_key(self, key, value):
        
        if key in self.options:
            self.options[key]['value'] = value
491888
def init(self, rules):
        """"""
        # Initialize the option parser
        for dest in rules.keys():
            rule = rules[dest]

            # Assign defaults ourselves here, instead of in the option parser
            # itself in order to allow for multiple calls to parse (dont want
            # subsequent calls to override previous values with default vals).
            if 'default' in rule:
                self.result['kwargs'][dest] = rule['default']

            flags = rule['flags']
            kwargs = { 'action': rule.get('action', "store") }
            # NOTE: Don't provision the parser with defaults here, per above.
            for key in ['callback', 'help', 'metavar', 'type']:
                if key in rule: kwargs[key] = rule[key]
            self.add_option(*flags, dest=dest, **kwargs)

            # Remember the dest vars that we see, so that we can merge results
            self.dests.add(dest)
118253
def _init_config(self):
        
        options = self.parser.parse_args()
        if options.config is None and options.input is None:
            self.parser.print_help()
            sys.exit(2)

        if options.config is not None:
            configFactory = ConfigFactory()
            config = configFactory.load_from_file(options.config)
        else:
            config = ConfigObject()

        if options.input is not None:
            config["input"]["locations"] = [str(x) for x in options.input]
        if options.arguments is not None:
            config["input"]["arguments"] = dict((x.partition("=")[0], x.partition("=")[2]) for x in options.arguments)

        if options.output is not None:
            config["output"]["location"] = options.output

        if options.no_validate is not None:
            config["input"]["validate"] = not options.no_validate

        if options.dry_run is not None:
            self.dry_run = options.dry_run
        if options.watch is not None:
            self.watch = options.watch
        if options.traceback is not None:
            self.traceback = options.traceback

        if options.quiet is not None:
            self.logger.setLevel(logging.WARNING)
        if options.silence is not None:
            logging.disable(logging.CRITICAL)

        configService = ConfigService()
        configService.validate(config)
        self.config = config
427421
def cb(option, value, parser):
    
    arguments = [value]
    for arg in parser.rargs:
        if arg[0] != "-":
            arguments.append(arg)
        else:
            del parser.rargs[:len(arguments)]
            break
    if getattr(parser.values, option.dest):
        arguments.extend(getattr(parser.values, option.dest))
    setattr(parser.values, option.dest, arguments)
651708
def set_option(self, name, value):
        
        self.__validate_option_name(name)
        self.__options[name] = value
1135582
def _set(self, section, option, value, verbose):
        
        if not self.has_section(section):
            self.add_section( section )
        if not is_text_string(value):
            value = repr( value )
        if verbose:
            print('%s[ %s ] = %s' % (section, option, value))  # spyder: test-skip
        cp.ConfigParser.set(self, section, option, value)
397545
def config(self, value: dict) -> None:
        

        self._config = value or {}
        validate_config('verifier', self._config)
1373748
def options=(options)
      super
      value.each do |k, v|
        k.options = options
        v.options = options
      end
    end
113756
def set_options(self, **options):
        
        opt2 = self._contexts[-1]
        for k, v in options.items():
            k2 = k.replace("_", "-")
            if v is None:
                opt2.pop(k2, None)
            else:
                opt2[k2] = v
680261
def zbar_config=(config_value)
      case config_value
      when String
        symbology = FFI::MemoryPointer.new :int
        config_t = FFI::MemoryPointer.new :int
        value = FFI::MemoryPointer.new :int
      
        if ZBar.zbar_parse_config(config_value, symbology, config_t, value) == 0
          # parsed successfully
          if ZBar.zbar_processor_set_config(@processor, symbology.read_int, config_t.read_int, value.read_int) == 0
            true
          else
            raise ArgumentError, "config string #{config_value.inspect} parsed but could not be set"
          end
        else
          raise ArgumentError, "config string #{config_value.inspect} was not recognized"
        end
        
      when Enumerable
        config_value.each { |value|
          self.zbar_config = value
        }
        
      else
        raise ArgumentError, "unsupported config value"
      end
    end
149614
def set_value(self, value):
        
        parsed_value = self._parse_value(value)
        self.value = parsed_value
751856
def set_defaults(self, default_config_params):
        
        map = StringValueMap.from_maps(default_config_params, self)
        return ConfigParams(map)
643899
def init(self, *args):
        '''
        '''
        cfg = {}
        for k, v in self.options.items():
            if k.lower() in self.cfg.settings and v is not None:
                cfg[k.lower()] = v
        return cfg
1303741
def set_option(section='main', cfg_file=cfg_file, **kwargs):
    
    parser = get_parser(cfg_file=cfg_file)
    if section not in parser.sections():
        parser.add_section(section)

    for k, v in kwargs.items():
        parser.set(section=section, option=k, value=v)

    with open(cfg_file, 'w') as f:
        parser.write(f)
    return "Done"