MCPcopy Index your code
hub / github.com/AI45Lab/Code / load_config

Function load_config

sdk/python/examples/test_generate_object.py:19–32  ·  view source on GitHub ↗

Load .a3s/config.acl from the repo root.

()

Source from the content-addressed store, hash-verified

17
18
19def load_config() -> str:
20 """Load .a3s/config.acl from the repo root."""
21 script_dir = Path(__file__).resolve().parent
22 candidates = [
23 script_dir / "../../../../../../.a3s/config.acl",
24 script_dir / "../../../../../.a3s/config.acl",
25 script_dir / "../../../../.a3s/config.acl",
26 script_dir / "../../../.a3s/config.acl",
27 ]
28 for p in candidates:
29 resolved = p.resolve()
30 if resolved.exists():
31 return resolved.read_text()
32 raise FileNotFoundError(".a3s/config.acl not found. Cannot run integration test.")
33
34
35# ============================================================================

Callers 1

mainFunction · 0.85

Calls 3

resolveMethod · 0.80
existsMethod · 0.45
read_textMethod · 0.45

Tested by

no test coverage detected