summaryrefslogtreecommitdiff
path: root/extmod/uasyncio/funcs.py
diff options
context:
space:
mode:
authorDamien Tournoud <damien@platform.sh>2022-12-13 08:22:11 -0800
committerDamien George <damien@micropython.org>2022-12-14 13:25:24 +1100
commit0eba00a92cd422febff560f0f0d1b89f3d0c008f (patch)
treeb98b974943d2e09f7aae5a6e53291ca9a4be05e0 /extmod/uasyncio/funcs.py
parentb75b5c102c4e4197ff4ed6967070cbf9a5b63b92 (diff)
extmod/uasyncio: Fix syntax of generator functions.
The compiler is not picky right now, but these are actually all syntax errors: - await is only valid in an async function - async functions that use yield are actually async generators (a construct not supported by the compiler right now)
Diffstat (limited to 'extmod/uasyncio/funcs.py')
-rw-r--r--extmod/uasyncio/funcs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/extmod/uasyncio/funcs.py b/extmod/uasyncio/funcs.py
index 96883e4fe..23a585aa9 100644
--- a/extmod/uasyncio/funcs.py
+++ b/extmod/uasyncio/funcs.py
@@ -4,7 +4,7 @@
from . import core
-def _run(waiter, aw):
+async def _run(waiter, aw):
try:
result = await aw
status = True
@@ -61,7 +61,8 @@ class _Remove:
pass
-async def gather(*aws, return_exceptions=False):
+# async
+def gather(*aws, return_exceptions=False):
if not aws:
return []