def get_version(package):
    init_py = open(os.path.join(package, '__init__.py')).read()
    return re.search("^__version__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)
Checks that a YAML file is valid YAML
dataset/ETHPy150Open vintasoftware/django-role-permissions/setup.py/get_version--crossover with--dataset/ETHPy150Open gosquadron/squadron/squadron/autotest.py/verify_yaml