diff sat/bridge/bridge_constructor/base_constructor.py @ 3039:a1bc34f90fa5

bridge (pb): implemented an asyncio compatible bridge: `pb` bridge can now be used with asyncio by instantiating AIOBridge.
author Goffi <goffi@goffi.org>
date Wed, 25 Sep 2019 08:53:38 +0200
parents ab2696e34d29
children 9d0df638c8b4
line wrap: on
line diff
--- a/sat/bridge/bridge_constructor/base_constructor.py	Wed Sep 25 08:41:36 2019 +0200
+++ b/sat/bridge/bridge_constructor/base_constructor.py	Wed Sep 25 08:53:38 2019 +0200
@@ -292,7 +292,8 @@
             extend_method(completion, function, default, arg_doc, async_)
 
             for part, fmt in FORMATS.items():
-                if part.startswith(function["type"]):
+                if (part.startswith(function["type"])
+                    or part.startswith(f"async_{function['type']}")):
                     parts[part.upper()].append(fmt.format(**completion))
 
         # at this point, signals_part, methods_part and direct_calls should be filled,