refactor: type cli typer context state

This commit is contained in:
lda
2026-06-03 18:41:20 +07:00 Verified
parent 2364d0cfa3
commit 47e1e3af67
3 changed files with 108 additions and 18 deletions
+7 -6
View File
@@ -5,6 +5,7 @@ from typing import Annotated
import typer
from .commands import artifacts, caps, deployments, docs, drafts, explain, runs, schema
from .context import CliTyperState
app = typer.Typer(
name="wf",
@@ -37,12 +38,12 @@ def root(
] = None,
) -> None:
"""Run workflow platform commands."""
ctx.obj = {
"config_path": config,
"force_local": local,
"rpc_url": url,
"rpc_timeout_seconds": timeout,
}
ctx.obj = CliTyperState(
config_path=config,
force_local=local,
rpc_url=url,
rpc_timeout_seconds=timeout,
)
app.add_typer(caps.app, name="cap")