<commit_before>import { endpoints, errors } from '@r/api-client';
const { ActivitiesEndpoint } = endpoints;
const { ResponseError } = errors;

import { apiOptionsFromState } from 'lib/apiOptionsFromState';
import { paramsToActiviesRequestId } from 'app/models/ActivitiesRequest';

export const POSTS_ACTIVITY = 'submitted';
export const COMMENTS_ACTIVITY = 'comments';

export const FETCHING_ACTIVITIES = 'FETCHING_ACTIVITIES';
export const fetching = (id, params) => ({
  type: FETCHING_ACTIVITIES,
  id,
  params,
});

export const RECEIVED_ACTIVITIES = 'RECEIVED_ACTIVITIES';
export const received = (id, apiResponse) => ({
  type: RECEIVED_ACTIVITIES,
  id,
  apiResponse,
});

export const FAILED = 'FAILED_ACTIVITIES';
export const failed = (id, error) => ({
  type: FAILED,
  error,
});

export const fetch = (activiesParams) => async (dispatch, getState) => {
  const state = getState();
  const id = paramsToActiviesRequestId(activiesParams);<commit_msg>[squash] Remove unnecessary parentheses.<commit_after>import { endpoints, errors } from '@r/api-client';
const { ActivitiesEndpoint } = endpoints;
const { ResponseError } = errors;

import { apiOptionsFromState } from 'lib/apiOptionsFromState';
import { paramsToActiviesRequestId } from 'app/models/ActivitiesRequest';

export const POSTS_ACTIVITY = 'submitted';
export const COMMENTS_ACTIVITY = 'comments';

export const FETCHING_ACTIVITIES = 'FETCHING_ACTIVITIES';
export const fetching = (id, params) => ({
  type: FETCHING_ACTIVITIES,
  id,
  params,
});

export const RECEIVED_ACTIVITIES = 'RECEIVED_ACTIVITIES';
export const received = (id, apiResponse) => ({
  type: RECEIVED_ACTIVITIES,
  id,
  apiResponse,
});

export const FAILED = 'FAILED_ACTIVITIES';
export const failed = (id, error) => ({
  type: FAILED,
  error,
});

export const fetch = activiesParams => async (dispatch, getState) => {
  const state = getState();
  const id = paramsToActiviesRequestId(activiesParams);
{'fraction_non_alphanumeric': 0.1194259354177345, 'fraction_numerical': 0.0, 'mean_word_length': 5.707903780068729, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6514024', 'n_tokens_mistral': 650, 'n_tokens_neox': 635, 'n_words': 158}