<commit_before>import logging
import pprint
import time
from pathlib import Path

from inotify import constants as ic
from inotify.adapters import Inotify

from i3configger import base, build, ipc

log = logging.getLogger(__name__)


class Watchman:
    BUILD_DELAY = 1
    """If an IDE does monkey business (e.g. Jetbrains "safe write")
    more than one change might be triggered for each change.

    Using a small delay to not trigger to often.
    """

    """Watch a config directories and build/refresh/notify on changes"""
    MASK = (
        ic.IN_CREATE | ic.IN_ATTRIB | ic.IN_DELETE |
        ic.IN_MODIFY | ic.IN_CLOSE_WRITE |
        ic.IN_MOVED_FROM | ic.IN_MOVED_TO |
        ic.IN_DELETE_SELF | ic.IN_MOVE_SELF)
    """Tell inotify to trigger on changes"""

    def __init__(self, configPath):
        self.partialsPath = str(configPath.parent).encode()
        self.configPath = configPath
        self.lastBuild = None
        self.lastFilePath = None
        self.errors = 0
        log.debug("initialized %s", self)

    def __str__(self):
        return "%s(%s)" % (
            self.__class__.__name__, pprint.pformat(self.__dict__))
<commit_msg>smalle build delay<commit_after>import logging
import pprint
import time
from pathlib import Path

from inotify import constants as ic
from inotify.adapters import Inotify

from i3configger import base, build, ipc

log = logging.getLogger(__name__)


class Watchman:
    BUILD_DELAY = 0.1
    """If an IDE does monkey business (e.g. Jetbrains "safe write")
    more than one change might be triggered for each change.

    Using a small delay to not trigger to often.
    """

    """Watch a config directories and build/refresh/notify on changes"""
    MASK = (
        ic.IN_CREATE | ic.IN_ATTRIB | ic.IN_DELETE |
        ic.IN_MODIFY | ic.IN_CLOSE_WRITE |
        ic.IN_MOVED_FROM | ic.IN_MOVED_TO |
        ic.IN_DELETE_SELF | ic.IN_MOVE_SELF)
    """Tell inotify to trigger on changes"""

    def __init__(self, configPath):
        self.partialsPath = str(configPath.parent).encode()
        self.configPath = configPath
        self.lastBuild = None
        self.lastFilePath = None
        self.errors = 0
        log.debug("initialized %s", self)

    def __str__(self):
        return "%s(%s)" % (
            self.__class__.__name__, pprint.pformat(self.__dict__))

{'fraction_non_alphanumeric': 0.0908315565031983, 'fraction_numerical': 0.0029850746268656717, 'mean_word_length': 2.820846905537459, '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': '3701128', 'n_tokens_mistral': 742, 'n_tokens_neox': 719, 'n_words': 216}