<commit_before>"""hug/_reloader.py
Taken from Bottle framework
"""
import os.path
import threading
import sys
import time
import _thread as thread

class FileCheckerThread(threading.Thread):
    ''' Interrupt main-thread as soon as a changed module file is detected,
        the lockfile gets deleted or gets to old. '''

    def __init__(self, lockfile, interval):
        threading.Thread.__init__(self)
        self.lockfile, self.interval = lockfile, interval
        #: Is one of 'reload', 'error' or 'exit'
        self.status = None

    def run(self):
        exists = os.path.exists
        mtime = lambda path: os.stat(path).st_mtime
        files = dict()

        for module in list(sys.modules.values()):<commit_msg>Formatting fixes<commit_after>"""hug/_reloader.py
Taken from Bottle framework
"""
import os.path
import threading
import sys
import time
import _thread as thread


class FileCheckerThread(threading.Thread):
    """Utility class to interrupt main-thread as soon as a changed module file is detected,
       the lockfile gets deleted or gets too old.
    """
    def __init__(self, lockfile, interval):
        threading.Thread.__init__(self)
        self.lockfile, self.interval = lockfile, interval
        self.status = None #: Is one of 'reload', 'error' or 'exit'

    def run(self):
        exists = os.path.exists
        mtime = lambda path: os.stat(path).st_mtime
        files = dict()

        for module in list(sys.modules.values()):
{'fraction_non_alphanumeric': 0.09775967413441955, 'fraction_numerical': 0.0, 'mean_word_length': 3.0383561643835617, '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': '60597', 'n_tokens_mistral': 426, 'n_tokens_neox': 417, 'n_words': 143}