Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
3038:5f3068915686 | 3039:a1bc34f90fa5 |
---|---|
290 self, "{}_completion_{}".format(side, function["type"]) | 290 self, "{}_completion_{}".format(side, function["type"]) |
291 ) | 291 ) |
292 extend_method(completion, function, default, arg_doc, async_) | 292 extend_method(completion, function, default, arg_doc, async_) |
293 | 293 |
294 for part, fmt in FORMATS.items(): | 294 for part, fmt in FORMATS.items(): |
295 if part.startswith(function["type"]): | 295 if (part.startswith(function["type"]) |
296 or part.startswith(f"async_{function['type']}")): | |
296 parts[part.upper()].append(fmt.format(**completion)) | 297 parts[part.upper()].append(fmt.format(**completion)) |
297 | 298 |
298 # at this point, signals_part, methods_part and direct_calls should be filled, | 299 # at this point, signals_part, methods_part and direct_calls should be filled, |
299 # we just have to place them in the right part of the template | 300 # we just have to place them in the right part of the template |
300 bridge = [] | 301 bridge = [] |