def to_dict(self, include_all=False): res = super(out_type, self).to_dict(include_all=include_all) if method_type is not None: res['type'] = get_import_path(first_arg, func_to_execute.__name__) else: res['type'] = get_import_path(func_to_execute) return res
def to_dict(self, include_all=False): res = super(AutosavedOperation, self).to_dict(include_all=include_all) if first_arg is not None: res['type'] = get_import_path(first_arg, func_to_execute.__name__, 'operation_class') else: res['type'] = get_import_path(func_to_execute, 'operation_class') return res
def get_spec_type_string(self): if isinstance(self.spec_type, basestring): return self.spec_type else: return get_import_path(self.spec_type)
def change_type(self, spec_type, new_type): return self.change_field(spec_type, 'type', get_import_path(spec_type), get_import_path(new_type))
def transformation(self, doc): if self.matches(doc): doc = doc.copy() doc['type'] = get_import_path(self.new_type) return doc