Reformatted code base using black.

This commit is contained in:
Goffi 2024-06-19 18:44:57 +02:00
commit 53fdaa9d09

View file

@ -29,8 +29,11 @@ class List(base.CommandBase):
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 @@ class List(base.CommandBase):
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 @@ class Stop(base.CommandBase):
)
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 @@ class Exposed(base.CommandBase):
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 @@ class Exposed(base.CommandBase):
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 @@ class Application(base.CommandBase):
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"],
)