Skip to content

Commit 1023ac7

Browse files
committed
fix: rename async_fetch to avoid doctest namespace collision with timeout.md
Signed-off-by: Fernando Macedo <fgmacedo@gmail.com>
1 parent 79a4cb4 commit 1023ac7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/invoke.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ This is ideal for non-blocking async I/O:
282282
```py
283283
>>> import asyncio
284284

285-
>>> async def fetch_data():
285+
>>> async def async_fetch():
286286
... await asyncio.sleep(0.01) # simulates async I/O
287287
... return {"status": "ok"}
288288

289289
>>> class AsyncLoader(StateChart):
290-
... loading = State(initial=True, invoke=fetch_data)
290+
... loading = State(initial=True, invoke=async_fetch)
291291
... ready = State(final=True)
292292
... done_invoke_loading = loading.to(ready)
293293
...

0 commit comments

Comments
 (0)