Add new fields to the current typedef.
345912
def add_to_typedef(typedef_curr, obo_line):
    """"""
    if obo_line[:4] == "id: ":
        assert not typedef_curr.item_id
        item_id = obo_line[4:]
        typedef_curr.item_id = item_id
    elif obo_line[:6] == "name: ":
        assert not typedef_curr.name
        typedef_curr.name = obo_line[6:]
    elif obo_line[:11] == "namespace: ":
        assert not typedef_curr.namespace
        typedef_curr.namespace = obo_line[11:]
    elif obo_line[17:] == "transitive_over: ":
        field_value = obo_line[17:].split('!')[0].rstrip()
        typedef_curr.transitive_over.append(field_value)
    elif obo_line[12:] == "inverse_of":
        assert not typedef_curr.inverse_of
        field_value = obo_line[12:].split('!')[0].rstrip()
        typedef_curr.inverse_of = field_value
133981
def add_new_fields(data, data_to_add):
        
        for key, value in data_to_add.items():
            if not data.get(key):
                data[key] = value

        return data
9462
public FieldInfo addField(Modifiers modifiers,
                              String fieldName,
                              TypeDesc type) {
        FieldInfo fi = new FieldInfo(this, modifiers, fieldName, type);
        mFields.add(fi);
        return fi;
    }
13243
def fill_fields(self, **kwargs):
        """"""
        for name, value in kwargs.items():
            field = getattr(self, name)
            field.send_keys(value)
310256
def _add_to_obj(self, rec_curr, typedef_curr, line):
        """"""
        if rec_curr is not None:
            self._add_to_ref(rec_curr, line)
        else:
            add_to_typedef(typedef_curr, line)
607545
def _add_form_fields(obj, lines):
    
    lines.append("**Form fields:**")
    lines.append("")
    for name, field in obj.base_fields.items():
        field_type = "{}.{}".format(field.__class__.__module__, field.__class__.__name__)
        tpl = "* ``{name}``: {label} (:class:`~{field_type}`)"
        lines.append(tpl.format(
            name=name,
            field=field,
            label=field.label or name.replace('_', ' ').title(),
            field_type=field_type
        ))
121799
def _init_typedef(self, typedef_curr, name, lnum):
        """"""
        if typedef_curr is None:
            return TypeDef()
        msg = "PREVIOUS {REC} WAS NOT TERMINATED AS EXPECTED".format(REC=name)
        self._die(msg, lnum)
344379
public void addField(String fieldName, String type, short flags) {
        short fieldNameIndex = itsConstantPool.addUtf8(fieldName);
        short typeIndex = itsConstantPool.addUtf8(type);
        itsFields.add(new ClassFileField(fieldNameIndex, typeIndex, flags));
    }
1095167
public void addField(String scope, String type, String name, String defaultValue) {
        fields.put(name, new FieldCode(scope, name, type, defaultValue));
    }
932490
def add_fields(self, fields):
        
        for field in fields:
            cls = field.__class__
            try:
                container = FieldsContainer.class_container[cls]
            except KeyError:
                raise ValueError('Object of type %s is an invalid field' % cls)
            getattr(self, container).append(field)
1105404
def basicsize(obj, **opts):
    '''
    '''
    v = _typedefof(obj, **opts)
    if v:
        v = v.base
    return v
352448
def add_fields(self, **fields):
        
        query = {}
        for field in fields:
            query[field] = fields[field]
        self._q.append({'$addFields': query})
        return self
980301
@Override
  public Context addInheritsFrom(Context moreGeneral) throws KbTypeException, CreateException {
    return wrapped().addInheritsFrom(moreGeneral);
  }
1121884
def register(self, ptype):
        """"""
        # Too many of them leads to memory burst
        if len(self.typedefs) < cfg.getint('typing', 'max_combiner'):
            self.typedefs.append(ptype)
            return True
        return False
775257
def add(self, parent, obj_type, **attributes):
        

        return self.ixn.add(parent.obj_ref(), obj_type, *self._get_args_list(**attributes))
974367
public static TypeDef typeExtends(TypeDef base, ClassRef superClass) {
        return new TypeDefBuilder(base)
                .withExtendsList(superClass)
                .build();
    }
95280
def p_Typedef(p):
  
  p[0] = model.Typedef(type_extended_attributes=p[2], type=p[3], name=p[4])