ruff reformatted

This commit is contained in:
春河晴
2025-04-08 15:31:13 +09:00
parent 0d7068acab
commit 7840a6080d
40 changed files with 1227 additions and 1336 deletions

View File

@@ -2,6 +2,7 @@ import json
from typing import Dict
import os
def load_scenes() -> Dict:
"""
从JSON文件加载场景数据
@@ -10,13 +11,15 @@ def load_scenes() -> Dict:
Dict: 包含所有场景的字典
"""
current_dir = os.path.dirname(os.path.abspath(__file__))
json_path = os.path.join(current_dir, 'template_scene.json')
with open(json_path, 'r', encoding='utf-8') as f:
json_path = os.path.join(current_dir, "template_scene.json")
with open(json_path, "r", encoding="utf-8") as f:
return json.load(f)
PERSONALITY_SCENES = load_scenes()
def get_scene_by_factor(factor: str) -> Dict:
"""
根据人格因子获取对应的情景测试