INNER CODE UNIT · Python

_check_step_list

llm-d/llm-d · scripts/guide.py:340

def _check_step_list(node: Any, path: str, declared: set[str], f: Findings) -> None:
    """A step-list slot is either a flat list of steps or a map of named
    sub-groups (each value itself a step list). Both render to the same
    concatenated bash block."""
    if isinstance(node, list):
        for i, step in enumerate(node):
            _check_step(step, f"{path}[{i}]", declared, f)
        return
    if isinstance(node, dict):
        for group_name, group_steps in node.items():
            if not isinstance(group_name, str):
                f.error(
                    f"{path}: sub-group name must be a string, got {type(group_name).__name__}"
                )
                continue
            _check_step_list(group_steps, f"{path}.{group_name}", declared, f)
        return
    f.error(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…