diff libervia/backend/bridge/bridge_constructor/constructors/embedded/constructor.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 4b842c1fb686
children
line wrap: on
line diff
--- a/libervia/backend/bridge/bridge_constructor/constructors/embedded/constructor.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/bridge/bridge_constructor/constructors/embedded/constructor.py	Wed Jun 19 18:44:57 2024 +0200
@@ -48,9 +48,11 @@
     def core_completion_method(self, completion, function, default, arg_doc, async_):
         completion.update(
             {
-                "debug": ""
-                if not self.args.debug
-                else 'log.debug ("%s")\n%s' % (completion["name"], 8 * " "),
+                "debug": (
+                    ""
+                    if not self.args.debug
+                    else 'log.debug ("%s")\n%s' % (completion["name"], 8 * " ")
+                ),
                 "args_result": self.get_arguments(function["sig_in"], name=arg_doc),
                 "args_comma": ", " if function["sig_in"] else "",
             }
@@ -60,9 +62,8 @@
             completion["cb_or_lambda"] = (
                 "callback" if function["sig_out"] else "lambda __: callback()"
             )
-            completion[
-                "ret_routine"
-            ] = """\
+            completion["ret_routine"] = (
+                """\
         d = self._methods_cbs["{name}"]({args_result})
         if callback is not None:
             d.addCallback({cb_or_lambda})
@@ -72,13 +73,13 @@
             d.addErrback(errback)
         return d
         """.format(
-                **completion
+                    **completion
+                )
             )
         else:
             completion["ret_or_nothing"] = "ret" if function["sig_out"] else ""
-            completion[
-                "ret_routine"
-            ] = """\
+            completion["ret_routine"] = (
+                """\
         try:
             ret = self._methods_cbs["{name}"]({args_result})
         except Exception as e:
@@ -91,7 +92,8 @@
                 return ret
             else:
                 callback({ret_or_nothing})""".format(
-                **completion
+                    **completion
+                )
             )
 
     def core_completion_signal(self, completion, function, default, arg_doc, async_):