<commit_before>import os


class Toolchain:
    MCU_TYPES = {
        "stm32": "arm",
        "atsam": "arm",
        "at91sam": "arm",
        "atmega": "avr",
        "attiny": "avr",
        "msp430": "msp430"
    }

    @classmethod
    def mcu_type(cls, mcu):
        for prefix in cls.MCU_TYPES:
            if mcu.startswith(prefix):
                return cls.MCU_TYPES[prefix]
        return "unknown"

    @classmethod
    def find_toolchain(cls, mcu):
        type = cls.mcu_type(mcu)
        if type == "arm":
            from mcu_info_util.toolchain_arm import ToolchainARM
            return ToolchainARM()
        if type == "avr":
            from mcu_info_util.toolchain_avr import ToolchainAVR
            return ToolchainAVR()
        if type == "msp430":
            from mcu_info_util.toolchain_msp430 import ToolchainMSP430
            return ToolchainMSP430()
        return None

    def find_compiler(self):
        return ""

    def find_prefix(self):
        compiler = self.find_compiler()
        if compiler.endswith("gcc"):
            return compiler[0:-3]
        return os.path.dirname(compiler) + os.sep

    def get_flags(self, mcu):
        return []

    def generate_header(self, mcu, filename=None):<commit_msg>Win32 compatibility<commit_after>import os


class Toolchain:
    MCU_TYPES = {
        "stm32": "arm",
        "atsam": "arm",
        "at91sam": "arm",
        "atmega": "avr",
        "attiny": "avr",
        "msp430": "msp430"
    }

    @classmethod
    def mcu_type(cls, mcu):
        for prefix in cls.MCU_TYPES:
            if mcu.startswith(prefix):
                return cls.MCU_TYPES[prefix]
        return "unknown"

    @classmethod
    def find_toolchain(cls, mcu):
        type = cls.mcu_type(mcu)
        if type == "arm":
            from mcu_info_util.toolchain_arm import ToolchainARM
            return ToolchainARM()
        if type == "avr":
            from mcu_info_util.toolchain_avr import ToolchainAVR
            return ToolchainAVR()
        if type == "msp430":
            from mcu_info_util.toolchain_msp430 import ToolchainMSP430
            return ToolchainMSP430()
        return None

    def find_compiler(self):
        return ""

    def find_prefix(self):
        compiler = self.find_compiler()
        if compiler.endswith("gcc"):
            return compiler[0:-3]
        elif compiler.endswith("gcc.exe"):
            return compiler[0:-7]
        return os.path.dirname(compiler) + os.sep

    def get_flags(self, mcu):
        return []

    def generate_header(self, mcu, filename=None):
{'fraction_non_alphanumeric': 0.10552763819095477, 'fraction_numerical': 0.020100502512562814, 'mean_word_length': 2.0128055878928985, 'pattern_counts': {'":': 18, '<': 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': '5276345', 'n_tokens_mistral': 870, 'n_tokens_neox': 830, 'n_words': 180}