MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / load_roles

Function load_roles

scripts/init_user_metadata.py:24–33  ·  view source on GitHub ↗

加载 roles.json

(roles_path: str)

Source from the content-addressed store, hash-verified

22
23
24def load_roles(roles_path: str) -> Dict[str, Dict[str, Any]]:
25 """加载 roles.json"""
26 path = Path(roles_path)
27 if not path.is_absolute():
28 path = PROJECT_ROOT / roles_path
29
30 with path.open("r", encoding="utf-8") as f:
31 data = json.load(f)
32
33 return data.get("roles", {})
34
35
36def load_profiles(db_path: str) -> Dict[str, Dict[str, Any]]:

Callers 1

mainFunction · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected