Returns a dictionnary containing all the passed data and an item
        ``error_list`` which holds the result of :attr:`error_list`.
329514
def data(self):
        
        res = {'error_list': self.error_list}
        res.update(super(ValidationErrors, self).data)
        return res
728245
def error_codes(self):
        """"""
        if self._error_codes is None:
            from .tcex_error_codes import TcExErrorCodes

            self._error_codes = TcExErrorCodes()
        return self._error_codes
526118
def get_context_query_errors(self):
    
    if self._context_query_errors:  return self._context_query_errors
    if len(self._query_errors) < 3: return {}
    nts = ['A','C','G','T']
    poss = ['A','C','G','T','-']
    r = {}
    for i in nts:
      if i not in r:  r[i] = {}
      for j in nts:
        if j not in r[i]: r[i][j] = {}
        for k in poss:
          if k not in r[i][j]: 
            r[i][j][k] = {}
            r[i][j][k]['types'] = {}
            r[i][j][k]['total'] = 0
          for l in poss:
            if l not in r[i][j][k]['types']: r[i][j][k]['types'][l] = 0
    # now r is initialized
    for i in range(1,len(self._query_errors)-1):

      tobs = self._query_errors[i].get_observable()
      tunobs = self._query_errors[i].get_unobservable()
      otype = tobs.get_type()
      op = tobs.get_error_probability()
      before = tunobs.get_before_type()
      bp = tunobs.get_before_probability()
      after = tunobs.get_after_type()
      ap = tunobs.get_after_probability()
      if otype[2][0][0] == 'N': continue
      if otype[2][1][0] == 'N': continue
      if before:
        if before[2][0][0] == 'N': continue
        if before[2][1][0] == 'N': continue
      if after:
        if after[2][0][0] == 'N': continue
        if after[2][1][0] == 'N': continue

      tbefore = self._query_errors[i-1].get_base()
      t = self._query_errors[i].get_base()
      tafter = self._query_errors[i+1].get_base()

      if tbefore == 'N' or tafter == 'N' or t == 'N': continue
      r[tbefore][t]['-']['total'] += 0.5
      r[t][tafter]['-']['total'] += 0.5
      r[tbefore][tafter][t]['total'] += 1

      # We know we made an observation
      if otype[0] == 'mismatch':
        tb = otype[2][0][0]
        qb = otype[2][1][0]
        r[tbefore][tafter][t]['types'][tb] += op
      elif otype[0] == 'match':
        tb = otype[2][0][0]
        qb = otype[2][1][0]
        r[tbefore][tafter][t]['types'][tb] += float(1)
      elif otype[0] == 'insertion':
        tb = otype[2][0][0]
        qb = otype[2][1][0]
        r[tbefore][tafter][t]['types']['-'] += op
        r[tbefore][tafter][t]['types'][tb] += (1-op)
      # make sure our deletion can't be bigger than 1
      hp_deletion_before = 0
      hp_deletion_after = 0
      if otype[0] == 'deletion':
        tb = otype[2][0][0]
        qb = otype[2][1][0]
        r[tbefore][tb]['-']['types'][tb] += op/2
        r[tb][tafter]['-']['types'][tb] += op/2
        #homopolymer ... so we do have the correct base
        r[tbefore][tafter][t]['types'][tb] += 1

      # now take care of total deletions
      if before:
        tb = before[2][0][0]
        r[tbefore][t]['-']['types'][tb] += bp
      if after:
        tb = after[2][0][0]
        r[t][tafter]['-']['types'][tb] += ap

      ##type = self._target_errors[i].get_type()
      #p = self._target_errors[i].get_error_probability()
      #if p > 0:
      #  if type[0] not in r[tbefore][t][tafter]['types']:
      #    r[tbefore][t][tafter]['types'][type[0]] = 0
      #  r[tbefore][t][tafter]['types'][type[0]] += p
      #r[tbefore][t][tafter]['total']+=1
    for b in r:
      for a in r:
        val = sum([r[b][a]['-']['types'][q] for q in nts])
        r[b][a]['-']['types']['-'] = r[b][a]['-']['total'] - val
    return r
41476
def _raise_on_error(data):
    """"""
    if isinstance(data, list):
        data = data[0]

    if isinstance(data, dict) and 'error' in data:
        raise_error(data['error'])
782553
def set_errors(self):
		
		if not self.field.errors or self.attrs.get("_no_errors"):
			return
		
		self.values["class"].append("error")

		for error in self.field.errors:
			self.values["errors"] += ERROR_WRAPPER % {"message": error}
707870
def error_codes(self):
        
        request_url = "{}/api/0/error_codes".format(self.instance)
        return_value = self._call_api(request_url)
        return return_value
888691
def struct(self):
        
        data = {}
        for var, fmap in self._def.items():
            if hasattr(self, var):
                data.update(fmap.get_outputs(getattr(self, var)))
        return data
402571
def errors(self):
        
        if self.ok():
            return {}

        errors = self.content

        if(not isinstance(errors, dict)):
            errors = {"error": errors}  # convert to dict for consistency
        elif('errors' in errors):
            errors = errors['errors']

        return errors
1077559
def get_return_list(self, data):
        
        return_list = []
        lst = self.get_list_key(data, 'return')
        for l in lst:
            name, desc, rtype = l
            if l[2] is None:
                rtype = l[0]
                name = None
                desc = desc.strip()
            return_list.append((name, desc, rtype))

        return return_list
881522
def data(self):
        
        if self._data:
            return self._data

        retval = {}
        data = self.get_request_data()
        for subdata in data:
            for key, value in subdata.iteritems():
                if not key in retval:
                    retval[key] = value

        self._data = retval
        return retval
1294097
def format_error(self, error, args=None):
        
        if type(args) is dict:
            return error.format(**args)
        if type(args) is list or type(args) is tuple:
            return error.format(*args)

        return error
635001
def sorted_errors(self):
        
        for i, (name, mae) in enumerate(
                sorted(self.mae_dict.items(), key=lambda x: x[1])):
            yield(i + 1, name, self.mse_dict[name], self.mae_dict[name],)
414912
def list_data(self):
        
        fn = (lambda v: json.loads(decode(v))) if self._use_json else decode
        return map(fn, self._data.values())
916475
def _item_check(self, dim_vals, data):
        
        if not self._check_items:
            return
        elif self.data_type is not None and not isinstance(data, self.data_type):
            if isinstance(self.data_type, tuple):
                data_type = tuple(dt.__name__ for dt in self.data_type)
            else:
                data_type = self.data_type.__name__
            raise TypeError('{slf} does not accept {data} type, data elements have '
                            'to be a {restr}.'.format(slf=type(self).__name__,
                                                      data=type(data).__name__,
                                                      restr=data_type))
        elif not len(dim_vals) == self.ndims:
            raise KeyError('The data contains keys of length %d, but the kdims '
                           'only declare %d dimensions. Ensure that the number '
                           'of kdims match the length of the keys in your data.'
                           % (len(dim_vals), self.ndims))
842903
def to_dict(self, *args, **kwargs):
        """"""
        ret = super(HTTPError, self).to_dict(*args, **kwargs)
        if self.errors is not None:
            ret["errors"] = self.errors
        return ret
70772
def get_requests_with_errors(self):
        
        data = self._es.search(body={
            "size": max_query_results,
            "query": {
                "filtered": {
                    "query": {
                        "match_all": {}
                    },
                    "filter": {
                        "exists": {
                            "field": "errmsg"
                        }
                    }
                }
            }
        })
        return GremlinTestResult(False, data)
385392
def get_errors(audit_results):
        
        errors = []
        if audit_results:
            if audit_results.errors:
                errors.extend(audit_results.errors)
        return errors