(path: Path)
| 44 | |
| 45 | |
| 46 | def _load_graph_dict(path: Path) -> Dict[str, Any]: |
| 47 | data = read_yaml(path) |
| 48 | if not isinstance(data, dict): |
| 49 | raise ConfigError("subgraph YAML root must be a mapping", path=str(path)) |
| 50 | |
| 51 | graph_block = data.get("graph") |
| 52 | if graph_block is None: |
| 53 | graph_block = data |
| 54 | |
| 55 | if not isinstance(graph_block, dict): |
| 56 | raise ConfigError("subgraph graph section must be a mapping", path=f"{path}.graph") |
| 57 | |
| 58 | vars_block = data.get("vars") if isinstance(data.get("vars"), dict) else {} |
| 59 | |
| 60 | return {"graph": graph_block, "vars": vars_block} |
| 61 | |
| 62 | |
| 63 | def load_subgraph_config(file_path: str, *, parent_source: str | None = None) -> Tuple[Dict[str, Any], Dict[str, Any], str]: |
no test coverage detected