Get the result(s) for this hook call.

        If the hook was marked as a ``firstresult`` only a single value
        will be returned otherwise a list of results.
554529
def get_result(self):
        
        __tracebackhide__ = True
        if self._excinfo is None:
            return self._result
        else:
            ex = self._excinfo
            if _py3:
                raise ex[1].with_traceback(ex[2])
            _reraise(*ex)
535587
def _makeResult(self):
        
        return [reporter(self.stream, self.descriptions, self.verbosity) for reporter in self.resultclass]
1210248
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return AddOnResultInstance(
            self._version,
            payload,
            account_sid=self._solution['account_sid'],
            reference_sid=self._solution['reference_sid'],
            sid=self._solution['sid'],
        )
1093348
def hook_result(messages)
      status, output = basic_status_and_output(messages)

      # Nothing to do if there are no problems to begin with
      return [status, output] if status == :pass

      # Return as-is if this type of hook doesn't have the concept of modified lines
      return [status, output] unless @hook.respond_to?(:modified_lines_in_file)

      handle_modified_lines(messages, status)
    end
985794
private function result()
    {
        // TODO: Call $this->onError(); hook

        // FIXME: Should be executed when exception is caught
        if (false) {
            // If not valid, return an error message to the tool consumer if a return URL is provided
            if (!empty($this->returnUrl)) {
                $error_url = $this->returnUrl;
                if (strpos($error_url, '?') === false) {
                    $error_url .= '?';
                } else {
                    $error_url .= '&';
                }
                if ($this->debugMode && !is_null($this->reason)) {
                    $error_url .= 'lti_errormsg=' . urlencode("Debug error: $this->reason");
                } else {
                    $error_url .= 'lti_errormsg=' . urlencode($this->message);
                    if (!is_null($this->reason)) {
                        $error_url .= '&lti_errorlog=' . urlencode("Debug error: $this->reason");
                    }
                }
                if (!is_null($this->consumer) && isset($_POST['lti_message_type']) && ($_POST['lti_message_type'] === 'ContentItemSelectionRequest')) {
                    $form_params = [];
                    if (isset($_POST['data'])) {
                        $form_params['data'] = $_POST['data'];
                    }
                    $version = (isset($_POST['lti_version'])) ? $_POST['lti_version'] : ToolProvider::LTI_VERSION1;
                    $form_params = $this->consumer->signParameters($error_url, 'ContentItemSelection', $version, $form_params);
                    $page = ToolProvider::sendForm($error_url, $form_params);
                    echo $page;
                } else {
                    header("Location: {$error_url}");
                }
                exit;
            } else {
                if (!is_null($this->errorOutput)) {
                    echo $this->errorOutput;
                } else if ($this->debugMode && !empty($this->reason)) {
                    echo "Debug error: {$this->reason}";
                } else {
                    echo "Error: {$this->message}";
                }
            }
        } else if (!is_null($this->redirectUrl)) {
            header("Location: {$this->redirectUrl}");
            exit;
        } else if (!is_null($this->output)) {
            echo $this->output;
        }
    }
817945
def _handle_api_result(result: Optional[Dict[str, Any]]) -> Any:
    
    if isinstance(result, dict):
        if result.get('status') == 'failed':
            raise ActionFailed(retcode=result.get('retcode'))
        return result.get('data')
433346
def getResults(self):
        

        results = self._response.copy()
        if 'status' in self._response.keys():
            if results['status'] is not None:
                del results['status']
            return results
        else:
            return None
574572
@Nullable
    public Object getResult(TBase<?, ?> result) throws TException {
        for (TFieldIdEnum fieldIdEnum : exceptionFields()) {
            if (ThriftFieldAccess.isSet(result, fieldIdEnum)) {
                throw (TException) ThriftFieldAccess.get(result, fieldIdEnum);
            }
        }

        final TFieldIdEnum successField = successField();
        if (successField == null) { //void method
            return null;
        } else if (ThriftFieldAccess.isSet(result, successField)) {
            return ThriftFieldAccess.get(result, successField);
        } else {
            throw new TApplicationException(
                    TApplicationException.MISSING_RESULT,
                    result.getClass().getName() + '.' + successField.getFieldName());
        }
    }
350247
def gets(self, key):
        ""
        result_list = []
        if key in self.keys():
            result_list.append(self[key])
        for v in self.values():
            if isinstance(v, self.__class__):
                sub_res_list = v.gets(key)
                for res in sub_res_list:
                    result_list.append(res)
            elif isinstance(v, dict):
                if key in v.keys():
                    result_list.append(v[key])
        return result_list
143135
public function getResults()
    {
        if (is_null($this->_resultsCache)) {
            $this->_resultsCache = call_user_func($this->getMapper());

            if ($this->prefetchRelatedLookups && !$this->_prefetchRelatedDone) {
                $this->_prefetchRelatedObjects();
            }
        }

        return $this->_resultsCache;
    }
963211
def _result_handler(self, response: Dict[str, Any]):
        
        res = response.get("MESSAGE")
        result = res.get("RESULT")
        return result
408763
def _get_result_constructor(self):
        
        if not self._values_list:  # we want models
            return self.model._construct_instance
        elif self._flat_values_list:  # the user has requested flattened list (1 value per row)
            key = self._only_fields[0]
            return lambda row: row[key]
        else:
            return lambda row: [row[f] for f in self._only_fields]
1285636
def first_completed(*async_result_wrappers):
    
    for item in async_result_wrappers:
        if not isinstance(item, AsyncMethodCall):
            raise TypeError("Got non-AsyncMethodCall object: {}".format(item))
    wrappers_copy = list(async_result_wrappers)
    while True:
        completed = list(filter(lambda x: x.finished(), wrappers_copy))
        if not len(completed):
            continue

        return completed[0].result()
515312
def get_response(self, results):
        
        if results is None:
            return None
        for result in itertools.chain.from_iterable(results):
            if isinstance(result, BaseResponse):
                return result
355721
public void getResult (ResultListener<T> rl)
    {
        if (_error != null) {
            rl.requestFailed(_error);
        } else if (_list == null) { // _list == null when we have a result
            rl.requestCompleted(_result);
        } else {
            _list.add(rl);
        }
    }
792132
def add_result(self, result):
        
        for handler in self._handlers:
            handler(result)
        if self._successful and result.status not in _successful_results:
            self._successful = False
903265
def relicResult(relicFunc, resultType, *args):
    
    result = None

    # If there is a return type, it becomes the first parameter.
    if resultType is not None:
        result = resultType()
        args = (result,) + args

    # Pass all parameters byref
    params = [byref(x) for x in list(args)]

    # Call the function and return our result.
    relicFunc(*params)
    return result