docs: clarify rpc client mixin contract

This commit is contained in:
lda
2026-06-03 12:15:41 +07:00 Verified
parent 1d46e69c53
commit 625123b264
+10 -1
View File
@@ -1,5 +1,7 @@
from __future__ import annotations
from dataclasses import dataclass
import httpx # noqa: F401 # Backcompat for tests patching client.httpx.AsyncClient.
from .client_artifacts import RpcArtifactClientMixin
@@ -10,6 +12,7 @@ from .client_drafts import RpcDraftClientMixin
from .client_runs import RpcRunClientMixin
@dataclass(slots=True)
class RpcWorkflowApiClient(
RpcClientTransport,
RpcCapabilityClientMixin,
@@ -18,7 +21,13 @@ class RpcWorkflowApiClient(
RpcDeploymentClientMixin,
RpcRunClientMixin,
):
"""WorkflowApiSurface implementation backed by JSON-RPC HTTP calls."""
"""WorkflowApiSurface implementation backed by JSON-RPC HTTP calls.
The inheritance order is intentional: `RpcClientTransport` owns dataclass
fields and `_call`; domain mixins are stateless method groups that may only
depend on `_call`. If a domain needs state or lifecycle later, prefer a
composed domain client instead of adding fields to a mixin.
"""
__all__ = ["RpcWorkflowApiClient"]