blob: 1ad7377201ce300af9fce767b8e47e5d7eebe0c6 (
plain)
1
2
3
4
5
6
7
8
9
10
|
import yaml
from pathlib import Path
def load_yml(file: Path, encoding="utf-8") -> dict:
"""加载 yml 文件"""
with open(file, "r", encoding=encoding) as f:
data = yaml.safe_load(f)
return data
|