MCPcopy
hub / github.com/openai/plugins / _iter_existing_paths

Function _iter_existing_paths

plugins/ngs-analysis/scripts/ngs_run_utils.py:257–269  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

255
256
257def _iter_existing_paths(value: Any) -> list[Path]:
258 paths: list[Path] = []
259 if isinstance(value, dict):
260 for item in value.values():
261 paths.extend(_iter_existing_paths(item))
262 elif isinstance(value, (list, tuple, set)):
263 for item in value:
264 paths.extend(_iter_existing_paths(item))
265 elif isinstance(value, str):
266 candidate = Path(value).expanduser()
267 if candidate.exists() and candidate.is_file():
268 paths.append(candidate.resolve())
269 return paths
270
271
272def input_checksums(inputs: dict[str, Any] | None) -> list[dict[str, Any]]:

Callers 1

input_checksumsFunction · 0.85

Calls 2

valuesMethod · 0.80
extendMethod · 0.80

Tested by

no test coverage detected