def _parse_revision(filename):
    pattern = re.compile(r"revision = '(\d+)'")
    with open(filename, 'r') as f:
        for line in f:
            match = pattern.match(line)
            if match:
                return int(match.group(1))

    raise RuntimeError(filename % "Failed to parse revision from %s")
dataset/ETHPy150Open bwaldvogel/openmoves/openmoves.py/_parse_revision/swapped operands of `%`