<commit_before>import {eventChannel} from 'redux-saga';

export default (task) => {

    /* XXX no buffering is specified, new messages will be lost if there are no pending takers */
    return eventChannel(emitter => {

        task.load = function(views, callback) {
            return emitter({type: 'load', views, callback});
        };

        task.getAnswer = function(callback) {
            return emitter({type: 'getAnswer', callback});
        };

        task.reloadAnswer = function(answer, callback) {
            return emitter({type: 'reloadAnswer', answer, callback});
        };

        task.gradeAnswer = function(answer, answer_token, callback) {

            return emitter({type: 'gradeAnswer', answer, answer_token, callback});
        };


        task.getState = function(callback) {
            return emitter({type: 'getState', callback});
        };

        task.reloadState = function(state, callback) {

            return emitter({type: 'reloadState', state, callback});
        };

        return () => {};
<commit_msg>emitter has no interesting return value<commit_after>import {eventChannel} from 'redux-saga';

export default (task) => {

    /* XXX no buffering is specified, new messages will be lost if there are no pending takers */
    return eventChannel(emitter => {

        task.load = function(views, callback) {
            emitter({type: 'load', views, callback});
        };

        task.getAnswer = function(callback) {
            emitter({type: 'getAnswer', callback});
        };

        task.reloadAnswer = function(answer, callback) {
            emitter({type: 'reloadAnswer', answer, callback});
        };

        task.gradeAnswer = function(answer, answer_token, callback) {
            emitter({type: 'gradeAnswer', answer, answer_token, callback});
        };


        task.getState = function(callback) {
            emitter({type: 'getState', callback});
        };

        task.reloadState = function(state, callback) {
            emitter({type: 'reloadState', state, callback});
        };

        return () => {};

{'fraction_non_alphanumeric': 0.13026819923371646, 'fraction_numerical': 0.0, 'mean_word_length': 2.447194719471947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4631256', 'n_tokens_mistral': 565, 'n_tokens_neox': 517, 'n_words': 143}