<commit_before>import { ERROR_API, REQUEST_API, SET_TYPE, SUCCESS_API } from '../../constants';

export default (state = {
                  isFetching: false,
                  type: 'popular',
                  currentSite: 'behance',
                  nbArticles: 10
                }, action) => {
  switch (action.type) {
    case [REQUEST_API, SET_TYPE] :
      return {
        ...state,
        isFetching: true
      };
    case SUCCESS_API :
      return {
        ...state,
        result: action.result,
        isFetching: false
      };
    case SET_TYPE :
      return {
        ...state,
        type: action.articleType
      }
    case ERROR_API :
      return {
        ...state,
        error: action.error,
        isFetching: true
      };
    default :
      return state;
  }
}<commit_msg>for test<commit_after>import { ERROR_API, REQUEST_API, SET_TYPE, SUCCESS_API } from '../../constants';

export default (state = {
                  isFetching: false,
                  type: 'popular',
                  currentSite: 'behance',
                  nbArticles: 10
                }, action) => {
  switch (action.type) {
    case [REQUEST_API, SET_TYPE] :
      return {
        ...state,
        isFetching: true
      };
    case SUCCESS_API :
      return {
        ...state,
        result: action.result,
        isFetching: false
      };
    case SET_TYPE :
      return {
        ...state,
        type: action.articleType
      }
    case ERROR_API :
      return {
        ...state,
        error: action.error,
        isFetching: true

      };
    default :
      return state;
  }
}
{'fraction_non_alphanumeric': 0.11097410604192355, 'fraction_numerical': 0.002466091245376079, 'mean_word_length': 1.3487698986975398, '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': '3854779', 'n_tokens_mistral': 483, 'n_tokens_neox': 470, 'n_words': 107}