def add_compiled_rules(self, filepath):
        try:
            path, filename = filepath.rsplit('/', 1)
        except __HOLE__:
            path, filename = '', filepath

        basename = filename.rsplit('.', 1)[0]

        params = {
            'path': path,
            'filename': filename,
            'basename': basename,
        }
        c_rules = self.compiled_rules
        for rule in self.rules:
            c_rules.append(re.compile(rule.format(**params)))
dataset/ETHPy150Open dcramer/quickunit/quickunit/filechecker.py/FileChecker.add_compiled_rules