File size: 288 Bytes
9313a90 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | from __future__ import annotations
from pathlib import Path
from typing import Any
import yaml
def load_config(path: str | Path) -> dict[str, Any]:
"""Load a YAML configuration file."""
with Path(path).open("r", encoding="utf-8") as file:
return yaml.safe_load(file)
|