docs: add code fences to Example: docstring blocks (#2104)

This commit is contained in:
Jonathan Hefner 2026-02-19 14:06:11 -06:00 • committed by GitHub
commit cb07adeca3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,8 +72,10 @@ async def cancel_task(
- Task is already in a terminal state (completed, failed, cancelled)
Example:
```python
async def handle_cancel(ctx, params: CancelTaskRequestParams) -> CancelTaskResult:
return await cancel_task(store, params.task_id)
```
"""
task = await store.get_task(task_id)
if task is None: