<commit_before>

class DummyLogger(object):
    """
    A logger that does absolutely nothing.  Meant as a drop in replacement for a
    logger that you would normally get from the logging module.
    """
    def __init__(self, prints=True):
        self.prints = prints

    def info(self, *args):
        if self.prints:
            print args
        return self

    def warn(self, *args):
        if self.prints:
            print args
        return self

    def error(self, *args):
        if self.prints:
            print args
        return self

    def debug(self, *args):
        if self.prints:
            print args
        return self<commit_msg>Added a DummyThread object.<commit_after>

class DummyLogger(object):
    """
    A logger that does absolutely nothing.  Meant as a drop in replacement for a
    logger that you would normally get from the logging module.
    """
    def __init__(self, prints=True):
        self.prints = prints

    def info(self, *args):
        if self.prints:
            print args
        return self

    def warn(self, *args):
        if self.prints:
            print args
        return self

    def error(self, *args):
        if self.prints:
            print args
        return self

    def debug(self, *args):
        if self.prints:
            print args
        return self


class DummyThread(object):
    """
    A drop in for threading.Thread.  It only has the join and start methods at the moment.
    """
    def __init__(self, target=False, args=()):
        if not target:
            raise ValueError('target must be callable.')
        if len(args) == 0 or type(args) != tuple:
            raise ValueError('args must be a tuple with more than 0 values')
        self.target = target
        self.args = args

    def join(self):
        """
        Does nothing.

        :return:
        """

        pass

    def start(self):
        """
        Execute the target function with the given args.

        :return:
        """

        return self.target(*self.args)
{'fraction_non_alphanumeric': 0.08406647116324535, 'fraction_numerical': 0.0009775171065493646, 'mean_word_length': 1.7587601078167117, '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': '2053014', 'n_tokens_mistral': 558, 'n_tokens_neox': 541, 'n_words': 208}