<commit_before>"""Configuration module"""


import configparser
import os
from dfman import const


class Config(object):
    """Create, load, and return configuration"""
    def __init__(self):
        self.cfg_file = os.path.join(const.USER_PATH, const.CFG)
        self.default_cfg_file = os.path.join(
            os.path.dirname(os.path.realpath(__file__)),
            const.DEFAULT_PATH,
            const.CFG
        )
        defaults = {
            'verbose': 'false',
            'backup_path': '%(user_home)s/.dfman/backups',
            'dotfile_path': '%(user_home)s/.dotfiles',
            'config_path': '%(user_home)s/.config',
            'log': '%(user_home)s/.dfman/dfman.log',
            'loglevel': 'DEBUG',
            'user_home': os.environ.get('HOME'),
            'HOME': os.environ.get('HOME')
        }
        self._config = configparser.ConfigParser(defaults)

    def setup_config(self):
        """Initialize configuration files and directories"""
        if not os.path.isfile(self.cfg_file):<commit_msg>Fix discrepency in default config<commit_after>"""Configuration module"""


import configparser
import os
from dfman import const


class Config(object):
    """Create, load, and return configuration"""
    def __init__(self):
        self.cfg_file = os.path.join(const.USER_PATH, const.CFG)
        self.default_cfg_file = os.path.join(
            os.path.dirname(os.path.realpath(__file__)),
            const.DEFAULT_PATH,
            const.CFG
        )
        defaults = {
            'verbose': 'false',
            'backup_path': '%(user_home)s/.dfman/backups',
            'dotfile_path': '%(user_home)s/.dotfiles/files',
            'config_path': '%(user_home)s/.config',
            'log': '%(user_home)s/.dfman/dfman.log',
            'loglevel': 'DEBUG',
            'user_home': os.environ.get('HOME'),
            'HOME': os.environ.get('HOME')
        }
        self._config = configparser.ConfigParser(defaults)

    def setup_config(self):
        """Initialize configuration files and directories"""
        if not os.path.isfile(self.cfg_file):
{'fraction_non_alphanumeric': 0.14387464387464388, 'fraction_numerical': 0.0, 'mean_word_length': 2.3766025641025643, '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': '4390586', 'n_tokens_mistral': 629, 'n_tokens_neox': 627, 'n_words': 115}