<commit_before>import importlib
import marshal
import os
import py_compile

from .python.modules import Module


def transpile(filename, srcdir='.', outdir=None):
    print("Compiling %s ..." % filename)
    py_compile.compile(filename)

    transpiler = Transpiler()
    transpiler.transpile(filename, srcdir)
    transpiler.write(outdir)


class Transpiler:
    def __init__(self, namespace="python"):
        self.namespace = namespace
        self.classfiles = []

    def write(self, outdir, verbosity=1):
        # Create directory tree to store classfile<commit_msg>Make sure voc raises errors picked up during Python bytecode compilation.<commit_after>import importlib
import marshal
import os
import py_compile

from .python.modules import Module


def transpile(filename, srcdir='.', outdir=None):
    print("Compiling %s ..." % filename)
    py_compile.compile(filename, doraise=True)

    transpiler = Transpiler()
    transpiler.transpile(filename, srcdir)
    transpiler.write(outdir)


class Transpiler:
    def __init__(self, namespace="python"):
        self.namespace = namespace
        self.classfiles = []

    def write(self, outdir, verbosity=1):
        # Create directory tree to store classfile
{'fraction_non_alphanumeric': 0.09754098360655737, 'fraction_numerical': 0.001639344262295082, 'mean_word_length': 3.864541832669323, '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': '6298467', 'n_tokens_mistral': 362, 'n_tokens_neox': 353, 'n_words': 96}