Force a given key/value pair into a certain form.
        
        Override the _conform_key and _conform_value if you want to change
        the mapping behaviour.
341489
def _conform_pair(self, pair):
        
        pair = tuple(pair)
        if len(pair) != 2:
            raise ValueError('MultiMap element must have length 2')
        return (self._conform_key(pair[0]), self._conform_value(pair[1]))
15501
def set_format_key_value(self, key, value):
        ''''''
        if self.format_keys is None:
            self.format_keys = []
            self.FORMAT = {}
        if key not in self.FORMAT:
            self.format_keys.append(key)
        self.FORMAT[key] = value
279719
def set(self, **kwargs):
        '''
        
        '''
        for lower_key, value in kwargs.items():
            if lower_key.lower() != lower_key:
                raise ValueError('Requires lowercase: %s' % lower_key)
            key = lower_key.upper()
            try:
                getattr(self, key)
            except (AttributeError, ConfigurationError):
                raise AttributeError('Cannot override %s' % key)
            self.overridden_settings[key] = value
225705
def set(self, key, value, **kwargs):
        '''
        
        '''
        return requests.put(
            '{}/{}/kv/{}'.format(
                self.master, pyconsul.__consul_api_version__, key),
            data=value,
            params=kwargs
        )
366105
def coerce(cls, key, value):
        """"""
        if value is None:
            return value
        if isinstance(value, cls):
            return value
        if isinstance(value, dict):
            return NestedMutableDict.coerce(key, value)
        if isinstance(value, list):
            return NestedMutableList.coerce(key, value)
        return super(cls).coerce(key, value)
424089
function (key, value) {
        // FIXME
        if (key === 'shape') {
            this.setShape(value);
            this.__dirtyPath = true;
            this._rect = null;
        }
        else {
            Displayable.prototype.attrKV.call(this, key, value);
        }
    }
120149
def coerce(cls, key, value):
        """"""
        if not isinstance(value, MutationList):
            if isinstance(value, list):
                return MutationList(value)

            # this call will raise ValueError
            return Mutable.coerce(key, value)
        else:
            return value
584046
def set(self, key, value):
        
        k = self._real_key(key.lower())
        self._override[k] = value
1334675
def set_key(key: str, value: str) -> dict:
    
    if not _conf.path:
        return {}

    if "toml" in _conf.path:
        with open(_conf.path, "r") as f:
            parser = parse(f.read())
        parser["tool"]["commitizen"][key] = value
        with open(_conf.path, "w") as f:
            f.write(parser.as_string())
    else:
        parser = configparser.ConfigParser()
        parser.read(_conf.path)
        parser["commitizen"][key] = value
        with open(_conf.path, "w") as f:
            parser.write(f)

    return _conf.config
770562
function conform(src, conf) {
  var dest = {};

  var rec = function(dest, src, conf) {
    Object.keys(conf).forEach(function(key) {
      if((typeof conf[key] === 'object' && !Array.isArray(conf[key]))) {
        dest[key] = rec({}, src[key] || {}, conf[key]);
      } else if(typeof conf[key] === 'object' && Array.isArray(conf[key])) {
        dest[key] = conf[key];
      } else {
        if(Object.prototype.hasOwnProperty.call(src, key)) {
          dest[key] = src[key];
        } else {
          dest[key] = src[key] || conf[key];
        }
      }
    });

    return dest;
  };

  return rec(dest, src, conf);
}
232634
def key_on(self, value):
        
        if isinstance(value, BASESTRING):
            value = (value,)
        self._key_on = value
846014
function set(key, value) {
    return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  }
1060436
def _normalize(self, key, value):
        

        # None value should not be converted by normalizer
        if value is None:
            return None

        normalize_func = getattr(self, 'normalize_{0}'.format(key),
                                 lambda x: x)

        return normalize_func(value)
593174
def set(self, key, value):
        
        if key == "tags":
            self._set_tag(tags=value)
        else:
            if isinstance(value, dict) and key in self._requirements and isinstance(
                    self._requirements[key], dict):
                self._requirements[key] = merge(self._requirements[key], value)
            else:
                self._requirements[key] = value
599893
def set(self, key, value):
        
        serialized = json.dumps(value)

        self.cursor.execute('select data from kv where key=?', [key])
        exists = self.cursor.fetchone()

        # Skip mutations to the same value
        if exists:
            if exists[0] == serialized:
                return value

        if not exists:
            self.cursor.execute(
                'insert into kv (key, data) values (?, ?)',
                (key, serialized))
        else:
            self.cursor.execute('''
            update kv
            set data = ?
            where key = ?''', [serialized, key])

        # Save
        if not self.revision:
            return value

        self.cursor.execute(
            'select 1 from kv_revisions where key=? and revision=?',
            [key, self.revision])
        exists = self.cursor.fetchone()

        if not exists:
            self.cursor.execute(
                '''insert into kv_revisions (
                revision, key, data) values (?, ?, ?)''',
                (self.revision, key, serialized))
        else:
            self.cursor.execute(
                '''
                update kv_revisions
                set data = ?
                where key = ?
                and   revision = ?''',
                [serialized, key, self.revision])

        return value
287816
def value(self, key, default=None):
        
        if self._customFormat:
            return self._customFormat.value(key, default)
        else:
            return unwrapVariant(super(XSettings, self).value(key))
426518
def set_property(self, key, value):
        

        if type(key) is str and type(value) is str:
            self.process_pair(key, value)
        else:
            raise TypeError('Both key and value should be strings!')