Skip to content

Commit 75114e3

Browse files
Copilotmoonbox3
andcommitted
style: replace ... with pass in CheckpointStorage and RunnerContext Protocol stubs
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com>
1 parent 6e7d9ac commit 75114e3

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

python/packages/core/agent_framework/_workflows/_checkpoint.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ async def save(self, checkpoint: WorkflowCheckpoint) -> CheckpointID:
128128
Returns:
129129
The unique ID of the saved checkpoint.
130130
"""
131-
...
131+
pass
132132

133133
async def load(self, checkpoint_id: CheckpointID) -> WorkflowCheckpoint:
134134
"""Load a checkpoint by ID.
@@ -142,7 +142,7 @@ async def load(self, checkpoint_id: CheckpointID) -> WorkflowCheckpoint:
142142
Raises:
143143
WorkflowCheckpointException: If no checkpoint with the given ID exists.
144144
"""
145-
...
145+
pass
146146

147147
async def list_checkpoints(self, *, workflow_name: str) -> list[WorkflowCheckpoint]:
148148
"""List checkpoint objects for a given workflow name.
@@ -153,7 +153,7 @@ async def list_checkpoints(self, *, workflow_name: str) -> list[WorkflowCheckpoi
153153
Returns:
154154
A list of WorkflowCheckpoint objects for the specified workflow name.
155155
"""
156-
...
156+
pass
157157

158158
async def delete(self, checkpoint_id: CheckpointID) -> bool:
159159
"""Delete a checkpoint by ID.
@@ -164,7 +164,7 @@ async def delete(self, checkpoint_id: CheckpointID) -> bool:
164164
Returns:
165165
True if the checkpoint was successfully deleted, False if no checkpoint with the given ID exists.
166166
"""
167-
...
167+
pass
168168

169169
async def get_latest(self, *, workflow_name: str) -> WorkflowCheckpoint | None:
170170
"""Get the latest checkpoint for a given workflow name.
@@ -175,7 +175,7 @@ async def get_latest(self, *, workflow_name: str) -> WorkflowCheckpoint | None:
175175
Returns:
176176
The latest WorkflowCheckpoint object for the specified workflow name, or None if no checkpoints exist.
177177
"""
178-
...
178+
pass
179179

180180
async def list_checkpoint_ids(self, *, workflow_name: str) -> list[CheckpointID]:
181181
"""List checkpoint IDs for a given workflow name.
@@ -186,7 +186,7 @@ async def list_checkpoint_ids(self, *, workflow_name: str) -> list[CheckpointID]
186186
Returns:
187187
A list of checkpoint IDs for the specified workflow name.
188188
"""
189-
...
189+
pass
190190

191191

192192
class InMemoryCheckpointStorage:

python/packages/core/agent_framework/_workflows/_runner_context.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -105,51 +105,51 @@ async def send_message(self, WorkflowMessage: WorkflowMessage) -> None:
105105
Args:
106106
WorkflowMessage: The WorkflowMessage to be sent.
107107
"""
108-
...
108+
pass
109109

110110
async def drain_messages(self) -> dict[str, list[WorkflowMessage]]:
111111
"""Drain all messages from the context.
112112
113113
Returns:
114114
A dictionary mapping executor IDs to lists of messages.
115115
"""
116-
...
116+
pass
117117

118118
async def has_messages(self) -> bool:
119119
"""Check if there are any messages in the context.
120120
121121
Returns:
122122
True if there are messages, False otherwise.
123123
"""
124-
...
124+
pass
125125

126126
async def add_event(self, event: WorkflowEvent) -> None:
127127
"""Add an event to the execution context.
128128
129129
Args:
130130
event: The event to be added.
131131
"""
132-
...
132+
pass
133133

134134
async def drain_events(self) -> list[WorkflowEvent]:
135135
"""Drain all events from the context.
136136
137137
Returns:
138138
A list of events that were added to the context.
139139
"""
140-
...
140+
pass
141141

142142
async def has_events(self) -> bool:
143143
"""Check if there are any events in the context.
144144
145145
Returns:
146146
True if there are events, False otherwise.
147147
"""
148-
...
148+
pass
149149

150150
async def next_event(self) -> WorkflowEvent: # pragma: no cover - interface only
151151
"""Wait for and return the next event emitted by the workflow run."""
152-
...
152+
pass
153153

154154
# Checkpointing capability
155155
def has_checkpointing(self) -> bool:
@@ -158,39 +158,39 @@ def has_checkpointing(self) -> bool:
158158
Returns:
159159
True if checkpointing is supported, False otherwise.
160160
"""
161-
...
161+
pass
162162

163163
def set_runtime_checkpoint_storage(self, storage: CheckpointStorage) -> None:
164164
"""Set runtime checkpoint storage to override build-time configuration.
165165
166166
Args:
167167
storage: The checkpoint storage to use for this run.
168168
"""
169-
...
169+
pass
170170

171171
def clear_runtime_checkpoint_storage(self) -> None:
172172
"""Clear runtime checkpoint storage override."""
173-
...
173+
pass
174174

175175
def reset_for_new_run(self) -> None:
176176
"""Reset the context for a new workflow run."""
177-
...
177+
pass
178178

179179
def set_streaming(self, streaming: bool) -> None:
180180
"""Set whether agents should stream incremental updates.
181181
182182
Args:
183183
streaming: True for streaming mode (stream=True), False for non-streaming (stream=False).
184184
"""
185-
...
185+
pass
186186

187187
def is_streaming(self) -> bool:
188188
"""Check if the workflow is in streaming mode.
189189
190190
Returns:
191191
True if streaming mode is enabled, False otherwise.
192192
"""
193-
...
193+
pass
194194

195195
async def create_checkpoint(
196196
self,
@@ -217,7 +217,7 @@ async def create_checkpoint(
217217
Returns:
218218
The ID of the created checkpoint.
219219
"""
220-
...
220+
pass
221221

222222
async def load_checkpoint(self, checkpoint_id: CheckpointID) -> WorkflowCheckpoint | None:
223223
"""Load a checkpoint without mutating the current context state.
@@ -228,23 +228,23 @@ async def load_checkpoint(self, checkpoint_id: CheckpointID) -> WorkflowCheckpoi
228228
Returns:
229229
The loaded checkpoint, or None if it does not exist.
230230
"""
231-
...
231+
pass
232232

233233
async def apply_checkpoint(self, checkpoint: WorkflowCheckpoint) -> None:
234234
"""Apply a checkpoint to the current context, mutating its state.
235235
236236
Args:
237237
checkpoint: The checkpoint whose state is to be applied.
238238
"""
239-
...
239+
pass
240240

241241
async def add_request_info_event(self, event: WorkflowEvent[Any]) -> None:
242242
"""Add a request_info event to the context and track it for correlation.
243243
244244
Args:
245245
event: The WorkflowEvent with type='request_info' to be added.
246246
"""
247-
...
247+
pass
248248

249249
async def send_request_info_response(self, request_id: str, response: Any) -> None:
250250
"""Send a response correlated to a pending request.
@@ -253,15 +253,15 @@ async def send_request_info_response(self, request_id: str, response: Any) -> No
253253
request_id: The ID of the original request.
254254
response: The response data to be sent.
255255
"""
256-
...
256+
pass
257257

258258
async def get_pending_request_info_events(self) -> dict[str, WorkflowEvent[Any]]:
259259
"""Get the mapping of request IDs to their corresponding request_info events.
260260
261261
Returns:
262262
A dictionary mapping request IDs to their corresponding WorkflowEvent (type='request_info').
263263
"""
264-
...
264+
pass
265265

266266

267267
class InProcRunnerContext:

0 commit comments

Comments
 (0)