MCPcopy
hub / github.com/opentrace/opentrace / find_config

Function find_config

agent/src/opentrace_agent/cli/config.py:31–41  ·  view source on GitHub ↗

Return the path to an existing config.yaml inside *opentrace_dir*. If *opentrace_dir* is ``None`` the function returns ``None``.

(opentrace_dir: Path | None)

Source from the content-addressed store, hash-verified

29
30
31def find_config(opentrace_dir: Path | None) -> Path | None:
32 """Return the path to an existing config.yaml inside *opentrace_dir*.
33
34 If *opentrace_dir* is ``None`` the function returns ``None``.
35 """
36 if opentrace_dir is None:
37 return None
38 candidate = opentrace_dir / CONFIG_NAME
39 if candidate.exists():
40 return candidate
41 return None
42
43
44def load_config(path: Path) -> dict[str, Any]:

Callers 3

get_api_tokenFunction · 0.90
loginFunction · 0.90
whoamiFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected