diff libervia/cli/cmd_application.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 47401850dec6
children
line wrap: on
line diff
--- a/libervia/cli/cmd_application.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/cli/cmd_application.py	Wed Jun 19 18:44:57 2024 +0200
@@ -29,8 +29,11 @@
 
     def __init__(self, host):
         super(List, self).__init__(
-            host, "list", use_profile=False, use_output=C.OUTPUT_LIST,
-            help=_("list available applications")
+            host,
+            "list",
+            use_profile=False,
+            use_output=C.OUTPUT_LIST,
+            help=_("list available applications"),
         )
 
     def add_parser_options(self):
@@ -52,7 +55,7 @@
         if self.args.filters:
             self.args.filters = list(set(self.args.filters))
         else:
-            self.args.filters = ['available']
+            self.args.filters = ["available"]
 
         try:
             found_apps = await self.host.bridge.applications_list(self.args.filters)
@@ -123,12 +126,12 @@
             )
         except Exception as e:
             if self.args.name is not None:
-                self.disp(
-                    f"can't stop application {self.args.name!r}: {e}", error=True)
+                self.disp(f"can't stop application {self.args.name!r}: {e}", error=True)
             else:
                 self.disp(
                     f"can't stop application instance with id {self.args.id!r}: {e}",
-                    error=True)
+                    error=True,
+                )
             self.host.quit(C.EXIT_BRIDGE_ERRBACK)
         else:
             self.host.quit()
@@ -138,8 +141,11 @@
 
     def __init__(self, host):
         super(Exposed, self).__init__(
-            host, "exposed", use_profile=False, use_output=C.OUTPUT_DICT,
-            help=_("show data exposed by a running application")
+            host,
+            "exposed",
+            use_profile=False,
+            use_output=C.OUTPUT_DICT,
+            help=_("show data exposed by a running application"),
         )
 
     def add_parser_options(self):
@@ -169,11 +175,13 @@
             if self.args.name is not None:
                 self.disp(
                     f"can't get values exposed from application {self.args.name!r}: {e}",
-                    error=True)
+                    error=True,
+                )
             else:
                 self.disp(
                     f"can't values exposed from  application instance with id {self.args.id!r}: {e}",
-                    error=True)
+                    error=True,
+                )
             self.host.quit(C.EXIT_BRIDGE_ERRBACK)
         else:
             exposed_data = data_format.deserialise(exposed_data_raw)
@@ -186,6 +194,9 @@
 
     def __init__(self, host):
         super(Application, self).__init__(
-            host, "application", use_profile=False, help=_("manage applications"),
-            aliases=['app'],
+            host,
+            "application",
+            use_profile=False,
+            help=_("manage applications"),
+            aliases=["app"],
         )