<commit_before>"""
Config file module

Config and environment stuff goes here, try keep OS-specific functions here too
"""

import configparser, os, platform

if platform.system() == "Windows":
    config_folder = os.path.join(os.path.expandvars("%APPDATA%"), "starcheat")
elif platform.system() == "Darwin":
    config_folder = os.path.expanduser("~/Library/Application Support/starcheat")
else:
    config_folder = os.path.expanduser("~/.starcheat")

if os.path.isdir(config_folder) == False:
    os.mkdir(config_folder)

CONFIG_VERSION = 2
ini_file = os.path.join(config_folder, "starcheat.ini")
# make a special case for this since it is referenced before the main window
log_folder = os.path.join(config_folder, "logs")

class Config():
    def __init__(self):
        self.config = configparser.ConfigParser()
        self.config_folder = config_folder
        self.ini_file = ini_file
        self.CONFIG_VERSION = CONFIG_VERSION

    def read(self, option):
        self.config.read(self.ini_file)
        return self.config["starcheat"][option]

    def has_key(self, option):<commit_msg>Bump config version<commit_after>"""
Config file module

Config and environment stuff goes here, try keep OS-specific functions here too
"""

import configparser, os, platform

if platform.system() == "Windows":
    config_folder = os.path.join(os.path.expandvars("%APPDATA%"), "starcheat")
elif platform.system() == "Darwin":
    config_folder = os.path.expanduser("~/Library/Application Support/starcheat")
else:
    config_folder = os.path.expanduser("~/.starcheat")

if os.path.isdir(config_folder) == False:
    os.mkdir(config_folder)

CONFIG_VERSION = 3
ini_file = os.path.join(config_folder, "starcheat.ini")
# make a special case for this since it is referenced before the main window
log_folder = os.path.join(config_folder, "logs")

class Config():
    def __init__(self):
        self.config = configparser.ConfigParser()
        self.config_folder = config_folder
        self.ini_file = ini_file
        self.CONFIG_VERSION = CONFIG_VERSION

    def read(self, option):
        self.config.read(self.ini_file)
        return self.config["starcheat"][option]

    def has_key(self, option):
{'fraction_non_alphanumeric': 0.12090909090909091, 'fraction_numerical': 0.0009090909090909091, 'mean_word_length': 4.130536130536131, 'pattern_counts': {'":': 4, '<': 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': '3667533', 'n_tokens_mistral': 684, 'n_tokens_neox': 659, 'n_words': 165}