refactor: deduplicate yaml import pattern via require_yaml()

This commit is contained in:
Abdessamad Derraz
2026-03-29 17:07:27 +02:00
parent 3c7fc26354
commit b4c5d77e4b
8 changed files with 28 additions and 44 deletions
+2 -6
View File
@@ -16,14 +16,10 @@ import os
import sys
sys.path.insert(0, os.path.dirname(__file__))
from common import list_registered_platforms, load_platform_config
from common import list_registered_platforms, load_platform_config, require_yaml
from truth import diff_platform_truth
try:
import yaml
except ImportError:
print("Error: PyYAML required (pip install pyyaml)", file=sys.stderr)
sys.exit(1)
yaml = require_yaml()
def _load_truth(truth_dir: str, platform: str) -> dict | None: