MCPcopy Create free account
hub / github.com/bcmi/OSInsert-Image-Composition / _resolve_optional_path

Function _resolve_optional_path

tests/test_os_insert.py:118–124  ·  view source on GitHub ↗
(p: str | None)

Source from the content-addressed store, hash-verified

116 model_dir = repo_root / model_dir
117
118 def _resolve_optional_path(p: str | None) -> str | None:
119 if p is None:
120 return None
121 pp = Path(p)
122 if pp.is_absolute():
123 return str(pp)
124 return str(repo_root / pp)
125
126 objectstitch_ckpt_path = _resolve_optional_path(OBJECTSTITCH_CKPT_PATH)
127 objectstitch_config_path = _resolve_optional_path(OBJECTSTITCH_CONFIG_PATH)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected