From e8c2d389758d94629a12bfab92c6b11f2eb6cdbf Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 16 Jan 2022 17:13:12 -0500 Subject: [PATCH] make assert be more helpful --- asyncio/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asyncio/core.py b/asyncio/core.py index f4440e2..31a890d 100644 --- a/asyncio/core.py +++ b/asyncio/core.py @@ -65,7 +65,7 @@ def __next__(self): # Pause task execution for the given time (integer in milliseconds, uPy extension) # Use a SingletonGenerator to do it without allocating on the heap def sleep_ms(t, sgen=SingletonGenerator()): - assert sgen.state is None + assert sgen.state is None, "Check for a missing `await` in your code" sgen.state = ticks_add(ticks(), max(0, t)) return sgen