<commit_before>import os
import sys
import errno
import fcntl
import atexit
import signal
import logging
import tempfile


__version__ = "1.1.0"

DEFAULT_PID_DIR = "/var/run/"


class PidFileError(Exception):
    pass


class PidFileUnreadableError(PidFileError):
    pass


class PidFileAlreadyRunningError(PidFileError):
    pass


class PidFileAlreadyLockedError(PidFileError):
    pass


class PidFile(object):
    __slots__ = ("pid", "pidname", "piddir", "enforce_dotpid_postfix", "register_term_signal_handler",
                 "term_signal_handler", "filename", "fh", "logger", "lock_pidfile", "chmod", "uid",
                 "gid", "force_tmpdir", "lazy")

    def __init__(self, pidname=None, piddir=None, enforce_dotpid_postfix=True,
                 register_term_signal_handler=True, term_signal_handler=None,
                 lock_pidfile=True, chmod=0o644, uid=-1, gid=-1, force_tmpdir=False,
                 lazy=False):
        self.pidname = pidname
        self.piddir = piddir<commit_msg>default to lazy setup for all instantiations<commit_after>import os
import sys
import errno
import fcntl
import atexit
import signal
import logging
import tempfile


__version__ = "1.1.0"

DEFAULT_PID_DIR = "/var/run/"


class PidFileError(Exception):
    pass


class PidFileUnreadableError(PidFileError):
    pass


class PidFileAlreadyRunningError(PidFileError):
    pass


class PidFileAlreadyLockedError(PidFileError):
    pass


class PidFile(object):
    __slots__ = ("pid", "pidname", "piddir", "enforce_dotpid_postfix", "register_term_signal_handler",
                 "term_signal_handler", "filename", "fh", "logger", "lock_pidfile", "chmod", "uid",
                 "gid", "force_tmpdir", "lazy")

    def __init__(self, pidname=None, piddir=None, enforce_dotpid_postfix=True,
                 register_term_signal_handler=True, term_signal_handler=None,
                 lock_pidfile=True, chmod=0o644, uid=-1, gid=-1, force_tmpdir=False,
                 lazy=True):
        self.pidname = pidname
        self.piddir = piddir
{'fraction_non_alphanumeric': 0.10439024390243902, 'fraction_numerical': 0.00878048780487805, 'mean_word_length': 3.608988764044944, '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': '1016823', 'n_tokens_mistral': 699, 'n_tokens_neox': 667, 'n_words': 139}