Parse repeated ``key=value`` CLI inputs into a dict. Shared by ``workflow run`` and ``workflow resume``. Exits with an error on any entry missing ``=``.
(input_values: list[str] | None)
| 51 | |
| 52 | |
| 53 | def _parse_input_values(input_values: list[str] | None) -> dict[str, Any]: |
| 54 | """Parse repeated ``key=value`` CLI inputs into a dict. |
| 55 | |
| 56 | Shared by ``workflow run`` and ``workflow resume``. Exits with an error |
| 57 | on any entry missing ``=``. |
| 58 | """ |
| 59 | inputs: dict[str, Any] = {} |
| 60 | for kv in input_values or []: |
| 61 | if "=" not in kv: |
| 62 | console.print(f"[red]Error:[/red] Invalid input format: {kv!r} (expected key=value)") |
| 63 | raise typer.Exit(1) |
| 64 | key, _, value = kv.partition("=") |
| 65 | inputs[key.strip()] = value.strip() |
| 66 | return inputs |
| 67 | |
| 68 | |
| 69 | def _reject_unsafe_dir(path: Path, label: str) -> None: |
no test coverage detected