Return fieldnames which need recalculation.
345926
def check_constraints(self, instance):
        '''
        
        '''
        recalc_fields = []
        for constraint in self.constraints:
            try:
                constraint(self.model, instance)
            except constraints.InvalidConstraint as e:
                recalc_fields.extend(e.fields)
        return recalc_fields
39059
def _replace(self, **kwds):
        ''
        result = self._make(map(kwds.pop, self._fields, self))
        
        if kwds:
            raise ValueError('Got unexpected field names: %r' % kwds.keys())
        
        return result
426300
def get_fields(cls):
        
        fields = {}
        for field_name in dir(cls):
            if isinstance(getattr(cls, field_name), Field):
                field = getattr(cls, field_name)
                field_name = field.field_name or field_name
                fields[field_name] = field
        return fields
368103
def get_field(self, field_name):
        """"""
        for attr_name, field in self:
            if field_name == attr_name:
                return field

        raise errors.FieldNotFound('Field not found', field_name)
372375
def fields_from_dict(d):
        """"""
        class_container = FieldsContainer.class_container
        fields = [field_cls.from_dict(field_dict) 
                  for field_cls, container in class_container.iteritems()
                  for field_dict in d.get(container, [])]
        return fields
144076
def get_field_names(self):
        
        field_names = []
        for table in self.tables:
            field_names.extend(table.get_field_names())
        for join_item in self.joins:
            field_names.extend(join_item.right_table.get_field_names())
        return field_names
1203738
def try_fields(cls, *names) -> t.Optional[t.Any]:
        """"""
        for name in names:
            if hasattr(cls, name):
                return getattr(cls, name)
        raise AttributeError((cls, names))
718785
public Set<String> getReturnFields() {

        if (m_fieldAdded) {
            for (CmsSearchField field : getLuceneFields()) {
                if (field.isStored() && !LAZY_FIELDS.contains(field.getName())) {
                    m_returnFields.add(field.getName());
                }
            }
        }
        m_fieldAdded = false;
        return m_returnFields;
    }
786225
def autosize_fieldname(idfobject):
    """"""
    # undocumented stuff in this code
    return [fname for (fname, dct) in zip(idfobject.objls,
                                          idfobject['objidd'])
            if 'autosizable' in dct]
21264
def _get_fields(self, fields, excludes, hotfixes):
        '''
        
        '''
        final_fields = {}
        fields = fields or []
        excludes = excludes or []

        for f in self.model._meta.fields:
            # If the field name is already present, skip
            if f.name in self.fields:
                continue

            # If field is not present in explicit field listing, skip
            if fields and f.name not in fields:
                continue

            # If field is in exclude list, skip
            if excludes and f.name in excludes:
                continue

            # If field is a relation, skip.
            if getattr(f, 'rel'):
                continue

            attr = {'model_attr': f.name}
            if f.has_default():
                attr['null_value'] = f.default

            if f.name in hotfixes:
                attr.update(hotfixes[f.name])

            final_fields[f.name] = django_field_to_index(f, **attr)

        return final_fields
518840
def _chk_fields(field_data, field_formatter):
        """"""
        if len(field_data) == len(field_formatter):
            return
        len_dat = len(field_data)
        len_fmt = len(field_formatter)
        msg = [
            "FIELD DATA({d}) != FORMATTER({f})".format(d=len_dat, f=len_fmt),
            "DAT({N}): {D}".format(N=len_dat, D=field_data),
            "FMT({N}): {F}".format(N=len_fmt, F=field_formatter)]
        raise Exception("\n".join(msg))
1056046
def magic_fields(self):
        """"""
        return {f:v for f, v in self.fields.items() if f.startswith('_')}
541140
def eval_fieldnames(string_, varname="fieldnames"):
    """"""
    ff = eval(string_)
    if not isinstance(ff, list):
        raise RuntimeError("{0!s} must be a list".format(varname))
    if not all([isinstance(x, str) for x in ff]):
        raise RuntimeError("{0!s} must be a list of strings".format(varname))
    ff = [x.upper() for x in ff]
    return ff
1024387
def _from_fields(self, fields):
        '''
        

        '''
        return _np.dtype(self.dtype()).type(next(fields))
645881
def get_field_names(ctx):
    """"""
    # this does not include labels and literals, only rule names and token names
    # TODO: check ANTLR parser template for full exclusion list
    fields = [
        field
        for field in type(ctx).__dict__
        if not field.startswith("__")
        and field not in ["accept", "enterRule", "exitRule", "getRuleIndex", "copyFrom"]
    ]
    return fields
821993
def fieldname_to_dtype(fieldname):
    """"""

    if fieldname == 'mode':
        return ('mode', np.uint8)
    elif fieldname in ("ox/red", "error", "control changes", "Ns changes",
                       "counter inc."):
        return (fieldname, np.bool_)
    elif fieldname in ("time/s", "P/W", "(Q-Qo)/mA.h", "x", "control/V",
                       "control/V/mA", "(Q-Qo)/C", "dQ/C", "freq/Hz",
                       "|Ewe|/V", "|I|/A", "Phase(Z)/deg", "|Z|/Ohm",
                       "Re(Z)/Ohm", "-Im(Z)/Ohm"):
        return (fieldname, np.float_)
    elif fieldname in ("cycle number", "I Range", "Ns", "half cycle"):
        return (fieldname, np.int_)
    elif fieldname in ("dq/mA.h", "dQ/mA.h"):
        return ("dQ/mA.h", np.float_)
    elif fieldname in ("I/mA", "<I>/mA"):
        return ("I/mA", np.float_)
    elif fieldname in ("Ewe/V", "<Ewe>/V"):
        return ("Ewe/V", np.float_)
    else:
        raise ValueError("Invalid column header: %s" % fieldname)
727056
def normal_fields(self):
        """"""
        return {f:v for f, v in self.fields.items() if not f.startswith('_')}