Skip to content

Commit 2ffc31f

Browse files
authored
Merge pull request #13 from dhalbert/forgot-await-message
Warn when an `await` may be missing
2 parents d40a4e8 + e8c2d38 commit 2ffc31f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asyncio/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __next__(self):
6565
# Pause task execution for the given time (integer in milliseconds, uPy extension)
6666
# Use a SingletonGenerator to do it without allocating on the heap
6767
def sleep_ms(t, sgen=SingletonGenerator()):
68-
assert sgen.state is None
68+
assert sgen.state is None, "Check for a missing `await` in your code"
6969
sgen.state = ticks_add(ticks(), max(0, t))
7070
return sgen
7171

0 commit comments

Comments
 (0)