<commit_before>#! /usr/bin/env python

import os

import config
import destalinator
import slackbot
import slacker

from utils.slack_logging import set_up_slack_logger
from utils.with_logger import WithLogger


class Executor(WithLogger):

    def __init__(self, slackbot_injected=None, slacker_injected=None):
        self.config = config.Config()
        slackbot_token = self.config.sb_token
        api_token = self.config.api_token
        self.slackbot = slackbot_injected or slackbot.Slackbot(config.slack_name, token=slackbot_token)
        set_up_slack_logger(self.slackbot)

        self.activated = self.config.activated == 'true'
        self.logger.debug("activated is %s", self.activated)

        self.slacker = slacker_injected or slacker.Slacker(config.slack_name, token=api_token)

        self.ds = destalinator.Destalinator(slacker=self.slacker,
                                            slackbot=self.slackbot,
                                            activated=self.activated)<commit_msg>No need for 'true' comparison for compatibility reasons<commit_after>#! /usr/bin/env python

import os

import config
import destalinator
import slackbot
import slacker

from utils.slack_logging import set_up_slack_logger
from utils.with_logger import WithLogger


class Executor(WithLogger):

    def __init__(self, slackbot_injected=None, slacker_injected=None):
        self.config = config.Config()
        slackbot_token = self.config.sb_token
        api_token = self.config.api_token
        self.slackbot = slackbot_injected or slackbot.Slackbot(config.slack_name, token=slackbot_token)
        set_up_slack_logger(self.slackbot)

        self.activated = self.config.activated
        self.logger.debug("activated is %s", self.activated)

        self.slacker = slacker_injected or slacker.Slacker(config.slack_name, token=api_token)

        self.ds = destalinator.Destalinator(slacker=self.slacker,
                                            slackbot=self.slackbot,
                                            activated=self.activated)
{'fraction_non_alphanumeric': 0.07662463627546072, 'fraction_numerical': 0.0, 'mean_word_length': 2.863295880149813, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7406265', 'n_tokens_mistral': 622, 'n_tokens_neox': 594, 'n_words': 115}