加载 roles.json
(roles_path: str)
| 37 | |
| 38 | |
| 39 | def load_roles(roles_path: str) -> Dict[str, Dict[str, Any]]: |
| 40 | """加载 roles.json""" |
| 41 | path = resolve_project_path(roles_path) |
| 42 | |
| 43 | with path.open("r", encoding="utf-8") as f: |
| 44 | data = json.load(f) |
| 45 | |
| 46 | return data.get("roles", {}) |
| 47 | |
| 48 | |
| 49 | def backup_profiles(db_path: Path) -> Path: |
no test coverage detected