Return the path to an existing config.yaml inside *opentrace_dir*. If *opentrace_dir* is ``None`` the function returns ``None``.
(opentrace_dir: Path | None)
| 29 | |
| 30 | |
| 31 | def 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 | |
| 44 | def load_config(path: Path) -> dict[str, Any]: |
no outgoing calls
no test coverage detected