<commit_before># Import pytohn libs
from __future__ import absolute_import, print_function
import logging

# Import salt libs
import salt.utils.reactor
import salt.syspaths
import salt.utils.event
import salt.utils.process
from salt.ext.six import string_types

log = logging.getLogger(__name__)

__func_alias__ = {
    'list_': 'list',
}


def list_(saltenv='base', test=None):
    '''

    '''
    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__)

    __jid_event__.fire_event({}, 'salt/reactors/manage/list')

    results = sevent.get_event(wait=30, tag='salt/reactors/manage/list-results')
    reactors = results['reactors']
    return reactors


def add(event, reactors, saltenv='base', test=None):
    '''

    '''
    if isinstance(reactors, string_types):
        reactors = [reactors]

    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__)

    __jid_event__.fire_event({'event': event,
                              'reactors': reactors},
                             'salt/reactors/manage/add')

    res = sevent.get_event(wait=30, tag='salt/reactors/manage/add-complete')
    return res['result']


def delete(event, saltenv='base', test=None):
    '''

    '''
    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__)

    __jid_event__.fire_event({'event': event}, 'salt/reactors/manage/delete')

    res = sevent.get_event(wait=30, tag='salt/reactors/manage/delete-complete')
    return res['result']<commit_msg>Fixing lint issues, empty doc strings.<commit_after># Import pytohn libs
from __future__ import absolute_import, print_function
import logging

# Import salt libs
import salt.utils.reactor
import salt.syspaths
import salt.utils.event
import salt.utils.process
from salt.ext.six import string_types

log = logging.getLogger(__name__)

__func_alias__ = {
    'list_': 'list',
}


def list_(saltenv='base', test=None):
    '''
    List currently configured reactors

    CLI Example:

    .. code-block:: bash

        salt-run reactor.list
    '''
    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__)

    __jid_event__.fire_event({}, 'salt/reactors/manage/list')

    results = sevent.get_event(wait=30, tag='salt/reactors/manage/list-results')
    reactors = results['reactors']
    return reactors


def add(event, reactors, saltenv='base', test=None):
    '''
    Add a new reactor

    CLI Example:

    .. code-block:: bash

        salt-run reactor.add 'salt/cloud/*/destroyed' reactors='/srv/reactor/destroy/*.sls'
    '''
    if isinstance(reactors, string_types):
        reactors = [reactors]

    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__)

    __jid_event__.fire_event({'event': event,
                              'reactors': reactors},
                             'salt/reactors/manage/add')

    res = sevent.get_event(wait=30, tag='salt/reactors/manage/add-complete')
    return res['result']


def delete(event, saltenv='base', test=None):
    '''
    Delete a reactor

    CLI Example:

    .. code-block:: bash

        salt-run reactor.delete 'salt/cloud/*/destroyed'
    '''
    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__)

    __jid_event__.fire_event({'event': event}, 'salt/reactors/manage/delete')

    res = sevent.get_event(wait=30, tag='salt/reactors/manage/delete-complete')
    return res['result']
{'fraction_non_alphanumeric': 0.13263211903540276, 'fraction_numerical': 0.0030785017957927143, 'mean_word_length': 2.62360594795539, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5865435', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1184, 'n_words': 222}