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

@ -118,14 +118,20 @@ class ExperimentalHandlers(Generic[LifespanResultT]):
The TaskSupport configuration object
Example:
# Simple in-memory setup
server.experimental.enable_tasks()
Simple in-memory setup:
# Custom store/queue for distributed systems
```python
server.experimental.enable_tasks()
```
Custom store/queue for distributed systems:
```python
server.experimental.enable_tasks(
store=RedisTaskStore(redis_url),
queue=RedisTaskMessageQueue(redis_url),
)
```
WARNING: This API is experimental and may change without notice.
"""