Inspect {State} fields, with extras

 @param extras [Hash] Non-member values to include

 @return [String]
 @api private
507235
def _inspect_details(extras)
      details = [self.class.name]
      fields = _members.merge(extras)
      details << Inspect.from_fields(fields) unless fields.empty?
      "#<#{details.join(' ')}>"
    end
1350101
def extra_field_type(index)
      t = extra_type(index).to_s
      case t
        when 'password'
          'password'
        when 'integer', 'float'
          'number'
        when 'boolean'
          'checkbox'
        else
          if t.downcase.index('in:')
            'select'
          else
            'text'
          end
      end
    end
1091985
def get_fields(model, include=None):
    
    fields = OrderedDict()
    info = model._meta
    if include:
        selected = [info.get_field(name) for name in include]
    else:
        selected = [field for field in info.fields if field.editable]
    for field in selected:
        fields[field.name] = field.verbose_name
    return fields
24974
def inspect_inner_hash(hash)
      hash.each do |key, value|
        if value.is_a? Array
          print_label key
          extract_hashes_and_print value
        elsif value.is_a? Hash
          print_subkey_and_value key, value
        else
          print_hash key, value
        end
      end
    end
377
def inspect
      ['{config', *each.map{|key, value| " "+qualified_key(*key)+" => "+value.inspect },'}'].join("\n")
    end
883
def get_extra_fields(self, model, fields):
        """"""

        def revert_url(self):
            """URL for this change in the default admin site."""
            opts = model._meta
            app_label, model_name = opts.app_label, opts.model_name
            return reverse(
                "%s:%s_%s_simple_history" % (admin.site.name, app_label, model_name),
                args=[getattr(self, opts.pk.attname), self.history_id],
            )

        def get_instance(self):
            attrs = {
                field.attname: getattr(self, field.attname) for field in fields.values()
            }
            if self._history_excluded_fields:
                excluded_attnames = [
                    model._meta.get_field(field).attname
                    for field in self._history_excluded_fields
                ]
                values = (
                    model.objects.filter(pk=getattr(self, model._meta.pk.attname))
                    .values(*excluded_attnames)
                    .get()
                )
                attrs.update(values)
            return model(**attrs)

        def get_next_record(self):
            """
            Get the next history record for the instance. `None` if last.
            """
            history = utils.get_history_manager_for_model(self.instance)
            return (
                history.filter(Q(history_date__gt=self.history_date))
                .order_by("history_date")
                .first()
            )

        def get_prev_record(self):
            """
            Get the previous history record for the instance. `None` if first.
            """
            history = utils.get_history_manager_for_model(self.instance)
            return (
                history.filter(Q(history_date__lt=self.history_date))
                .order_by("history_date")
                .last()
            )

        extra_fields = {
            "history_id": self._get_history_id_field(),
            "history_date": models.DateTimeField(),
            "history_change_reason": self._get_history_change_reason_field(),
            "history_type": models.CharField(
                max_length=1,
                choices=(("+", _("Created")), ("~", _("Changed")), ("-", _("Deleted"))),
            ),
            "history_object": HistoricalObjectDescriptor(
                model, self.fields_included(model)
            ),
            "instance": property(get_instance),
            "instance_type": model,
            "next_record": property(get_next_record),
            "prev_record": property(get_prev_record),
            "revert_url": revert_url,
            "__str__": lambda self: "{} as of {}".format(
                self.history_object, self.history_date
            ),
        }

        extra_fields.update(self._get_history_related_field(model))
        extra_fields.update(self._get_history_user_fields())

        return extra_fields
366950
def check_extras(dist, attr, value):
    """"""
    try:
        list(itertools.starmap(_check_extra, value.items()))
    except (TypeError, ValueError, AttributeError):
        raise DistutilsSetupError(
            "'extras_require' must be a dictionary whose values are "
            "strings or lists of strings containing valid project/version "
            "requirement specifiers."
        )
262974
def provides?(*names)
      names.flatten.any? do |name|
        if name.respond_to?(:to_sym)
          has_field?(name) || has_field?(aliases[name.to_sym])
        else
          false
        end
      end
    end
44986
def include_scopes
      @states.each do |state|
        state_name = state.name.to_s
        if @klass.respond_to?(state_name)
          fail InvalidMethodOverride,
               "Transitions: Can not define scope `#{state_name}` because there is already"\
               'an equally named method defined - either rename the existing method or the state.'
        end
        scope = @klass.instance_exec { -> { where(state_machine.attribute_name => state_name) } }
        @klass.scope state_name, scope
      end
    end
120179
def extract_options!(array)
      if array.last.is_a?(Hash) && array.last.instance_of?(Hash)
        array.pop
      else
        {}
      end
    end
497708
def parse_section_extras_require(self, section_options):
        
        parse_list = partial(self._parse_list, separator=';')
        self['extras_require'] = self._parse_section_to_dict(
            section_options, parse_list)
397778
function misc (options) {
  options.hash.scope = undefined
  options.hash['!kind'] = /module|constructor|external/
  options.hash['!isExported'] = true
  return handlebars.helpers.each(_identifiers(options), options)
}
1020180
def filter_fields(self, fields=[], exclude=[], include_all_if_empty=True):
        
        if not include_all_if_empty and not fields:
            return []
        ret = []
        for f in self.visible_fields():
            if fields and f.name not in fields:
                continue
            if exclude and f.name in exclude:
                continue
            ret.append(f)
        return ret
719242
public List<String> getExtraFieldNames()
    {
        List<String> result = new ArrayList<String>();

        for (Method method : getExtraFieldMethods())
        {
            ExtraField extraField = method.getAnnotation( ExtraField.class );
            result.add( extraField.value() );
        }

        return result;
    }
910719
function(record, extraNames) {
      var fieldNames = record.getFields().map(function (field) {
        return field.getName();
      });

      if (extraNames) {
        fieldNames = fieldNames.concat(extraNames);
      }
      return fieldNames;
    }
191548
def method_missing(m,*a,&b)
      m = m.to_s

      if (key = EXTRA_REGEX.match(m))
        if key['VAR'] == 'value'
          key = key['KEY'].to_i
          if VALID_EXTRA_KEY.include?(key)
            ivar = :"@#{m}"
            val = instance_variable_defined?(ivar) ? instance_variable_get(ivar) : nil
            tp = send("extra_#{key}_type")
            if tp == 'boolean'
              val = ((val === true) || (val == '1')) ? '1' : '0'
            end
            return val
          end
        end
      end

      super m, *a, &b
    end
879450
def _getbugfields(self):
        
        r = self._proxy.Bug.fields({'include_fields': ['name']})
        return [f['name'] for f in r['fields']]