MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _coerce_path_list

Function _coerce_path_list

config/loader.py:70–77  ·  view source on GitHub ↗
(value: Any, *, field_name: str)

Source from the content-addressed store, hash-verified

68
69
70def _coerce_path_list(value: Any, *, field_name: str) -> list[str]:
71 if value in (None, ""):
72 return []
73 if isinstance(value, str):
74 return [value]
75 if isinstance(value, Sequence) and not isinstance(value, (str, bytes, bytearray)):
76 return [str(item) for item in value]
77 raise ConfigError(f"`{field_name}` must be a string or list of strings.")
78
79
80def _load_merged_yaml(path: Path, visited: set[Path] | None = None) -> dict[str, Any]:

Callers 1

_load_merged_yamlFunction · 0.85

Calls 1

ConfigErrorClass · 0.85

Tested by

no test coverage detected