<commit_before>import {put, take, race, call} from 'redux-saga/effects';
import {FORM_SUBMIT} from './common';

export default (SubmissionError) => function* formSubmitSaga () {
  while (true) { // eslint-disable-line no-constant-condition
    const {
      meta: {
        successActionType,
        failureActionType,
        resolve,
        reject
      },
      payload
    } = yield take(FORM_SUBMIT);

    const [{success, failure}] = yield [
      race({
        success: take(successActionType),
        failure: take(failureActionType)
      }),
      put(payload),
    ];

    if (success) {
      yield call(resolve, success.payload);
    } else {
      yield call(reject, new SubmissionError(failure.payload));
    }
  }
};
<commit_msg>Fixed the other location causing depreciation warning<commit_after>import {all, put, take, race, call} from 'redux-saga/effects';
import {FORM_SUBMIT} from './common';

export default (SubmissionError) => function* formSubmitSaga () {
  while (true) { // eslint-disable-line no-constant-condition
    const {
      meta: {
        successActionType,
        failureActionType,
        resolve,
        reject
      },
      payload
    } = yield take(FORM_SUBMIT);

    const [{success, failure}] = yield all([
      race({
        success: take(successActionType),
        failure: take(failureActionType)
      }),
      put(payload),
    ]);

    if (success) {
      yield call(resolve, success.payload);
    } else {
      yield call(reject, new SubmissionError(failure.payload));
    }
  }
};

{'fraction_non_alphanumeric': 0.12002487562189054, 'fraction_numerical': 0.0, 'mean_word_length': 2.2703252032520327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2097025', 'n_tokens_mistral': 479, 'n_tokens_neox': 455, 'n_words': 106}