Files
dbt-core/scripts/check_libyaml.py
Emily Rockman 8e800cee4c Consolidate pre-commit config (#12140)
* use single version of tools

* isort
2025-11-05 12:20:29 -05:00

14 lines
456 B
Python
Executable File

#!/usr/bin/env python
try:
from yaml import CDumper as Dumper
from yaml import CLoader as Loader # noqa: F401
from yaml import CSafeLoader as SafeLoader
except ImportError:
from yaml import Dumper, Loader, SafeLoader # noqa: F401
if Loader.__name__ == "CLoader":
print("libyaml is working")
elif Loader.__name__ == "Loader":
print("libyaml is not working")
print("Check the python executable and pyyaml for libyaml support")