diff libervia/frontends/bridge/pb.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 730f542e4ad0
children 4cf98f506269
line wrap: on
line diff
--- a/libervia/frontends/bridge/pb.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/frontends/bridge/pb.py	Wed Jun 19 18:44:57 2024 +0200
@@ -48,9 +48,7 @@
             pass
         else:
             raise exceptions.InternalError(
-                "{name} signal handler has been registered twice".format(
-                    name=method_name
-                )
+                "{name} signal handler has been registered twice".format(name=method_name)
             )
         setattr(self, method_name, handler)
 
@@ -70,8 +68,7 @@
         """Convert Failure to BridgeException"""
         ori_errback(
             BridgeException(
-                name=failure_.type.decode('utf-8'),
-                message=str(failure_.value)
+                name=failure_.type.decode("utf-8"), message=str(failure_.value)
             )
         )
 
@@ -164,8 +161,9 @@
     def register_signal(self, functionName, handler, iface="core"):
         self.signals_handler.register_signal(functionName, handler, iface)
 
-
-    def action_launch(self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None):
+    def action_launch(
+        self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("action_launch", callback_id, data, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -192,7 +190,14 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def connect(self, profile_key="@DEFAULT@", password='', options={}, callback=None, errback=None):
+    def connect(
+        self,
+        profile_key="@DEFAULT@",
+        password="",
+        options={},
+        callback=None,
+        errback=None,
+    ):
         d = self.root.callRemote("connect", profile_key, password, options)
         if callback is not None:
             d.addCallback(callback)
@@ -201,7 +206,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def contact_add(self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None):
+    def contact_add(
+        self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("contact_add", entity_jid, profile_key)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -210,7 +217,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def contact_del(self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None):
+    def contact_del(
+        self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("contact_del", entity_jid, profile_key)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -228,7 +237,15 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def contact_update(self, entity_jid, name, groups, profile_key="@DEFAULT@", callback=None, errback=None):
+    def contact_update(
+        self,
+        entity_jid,
+        name,
+        groups,
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
         d = self.root.callRemote("contact_update", entity_jid, name, groups, profile_key)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -246,7 +263,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def contacts_get_from_group(self, group, profile_key="@DEFAULT@", callback=None, errback=None):
+    def contacts_get_from_group(
+        self, group, profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("contacts_get_from_group", group, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -264,8 +283,30 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def disco_find_by_features(self, namespaces, identities, bare_jid=False, service=True, roster=True, own_jid=True, local_device=False, profile_key="@DEFAULT@", callback=None, errback=None):
-        d = self.root.callRemote("disco_find_by_features", namespaces, identities, bare_jid, service, roster, own_jid, local_device, profile_key)
+    def disco_find_by_features(
+        self,
+        namespaces,
+        identities,
+        bare_jid=False,
+        service=True,
+        roster=True,
+        own_jid=True,
+        local_device=False,
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "disco_find_by_features",
+            namespaces,
+            identities,
+            bare_jid,
+            service,
+            roster,
+            own_jid,
+            local_device,
+            profile_key,
+        )
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -273,7 +314,15 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def disco_infos(self, entity_jid, node=u'', use_cache=True, profile_key="@DEFAULT@", callback=None, errback=None):
+    def disco_infos(
+        self,
+        entity_jid,
+        node="",
+        use_cache=True,
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
         d = self.root.callRemote("disco_infos", entity_jid, node, use_cache, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -282,7 +331,15 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def disco_items(self, entity_jid, node=u'', use_cache=True, profile_key="@DEFAULT@", callback=None, errback=None):
+    def disco_items(
+        self,
+        entity_jid,
+        node="",
+        use_cache=True,
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
         d = self.root.callRemote("disco_items", entity_jid, node, use_cache, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -318,8 +375,12 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def encryption_trust_ui_get(self, to_jid, namespace, profile_key, callback=None, errback=None):
-        d = self.root.callRemote("encryption_trust_ui_get", to_jid, namespace, profile_key)
+    def encryption_trust_ui_get(
+        self, to_jid, namespace, profile_key, callback=None, errback=None
+    ):
+        d = self.root.callRemote(
+            "encryption_trust_ui_get", to_jid, namespace, profile_key
+        )
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -354,8 +415,20 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def history_get(self, from_jid, to_jid, limit, between=True, filters='', profile="@NONE@", callback=None, errback=None):
-        d = self.root.callRemote("history_get", from_jid, to_jid, limit, between, filters, profile)
+    def history_get(
+        self,
+        from_jid,
+        to_jid,
+        limit,
+        between=True,
+        filters="",
+        profile="@NONE@",
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "history_get", from_jid, to_jid, limit, between, filters, profile
+        )
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -381,7 +454,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def image_generate_preview(self, image_path, profile_key, callback=None, errback=None):
+    def image_generate_preview(
+        self, image_path, profile_key, callback=None, errback=None
+    ):
         d = self.root.callRemote("image_generate_preview", image_path, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -417,7 +492,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def main_resource_get(self, contact_jid, profile_key="@DEFAULT@", callback=None, errback=None):
+    def main_resource_get(
+        self, contact_jid, profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("main_resource_get", contact_jid, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -435,8 +512,19 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def menu_launch(self, menu_type, path, data, security_limit, profile_key, callback=None, errback=None):
-        d = self.root.callRemote("menu_launch", menu_type, path, data, security_limit, profile_key)
+    def menu_launch(
+        self,
+        menu_type,
+        path,
+        data,
+        security_limit,
+        profile_key,
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "menu_launch", menu_type, path, data, security_limit, profile_key
+        )
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -462,8 +550,18 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def message_encryption_start(self, to_jid, namespace='', replace=False, profile_key="@NONE@", callback=None, errback=None):
-        d = self.root.callRemote("message_encryption_start", to_jid, namespace, replace, profile_key)
+    def message_encryption_start(
+        self,
+        to_jid,
+        namespace="",
+        replace=False,
+        profile_key="@NONE@",
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "message_encryption_start", to_jid, namespace, replace, profile_key
+        )
         if callback is not None:
             d.addCallback(lambda __: callback())
         if errback is None:
@@ -480,8 +578,20 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def message_send(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None):
-        d = self.root.callRemote("message_send", to_jid, message, subject, mess_type, extra, profile_key)
+    def message_send(
+        self,
+        to_jid,
+        message,
+        subject={},
+        mess_type="auto",
+        extra={},
+        profile_key="@NONE@",
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "message_send", to_jid, message, subject, mess_type, extra, profile_key
+        )
         if callback is not None:
             d.addCallback(lambda __: callback())
         if errback is None:
@@ -498,8 +608,34 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def notification_add(self, type_, body_plain, body_rich, title, is_global, requires_action, arg_6, priority, expire_at, extra, callback=None, errback=None):
-        d = self.root.callRemote("notification_add", type_, body_plain, body_rich, title, is_global, requires_action, arg_6, priority, expire_at, extra)
+    def notification_add(
+        self,
+        type_,
+        body_plain,
+        body_rich,
+        title,
+        is_global,
+        requires_action,
+        arg_6,
+        priority,
+        expire_at,
+        extra,
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "notification_add",
+            type_,
+            body_plain,
+            body_rich,
+            title,
+            is_global,
+            requires_action,
+            arg_6,
+            priority,
+            expire_at,
+            extra,
+        )
         if callback is not None:
             d.addCallback(lambda __: callback())
         if errback is None:
@@ -507,7 +643,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def notification_delete(self, id_, is_global, profile_key, callback=None, errback=None):
+    def notification_delete(
+        self, id_, is_global, profile_key, callback=None, errback=None
+    ):
         d = self.root.callRemote("notification_delete", id_, is_global, profile_key)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -516,8 +654,12 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def notifications_expired_clean(self, limit_timestamp, profile_key, callback=None, errback=None):
-        d = self.root.callRemote("notifications_expired_clean", limit_timestamp, profile_key)
+    def notifications_expired_clean(
+        self, limit_timestamp, profile_key, callback=None, errback=None
+    ):
+        d = self.root.callRemote(
+            "notifications_expired_clean", limit_timestamp, profile_key
+        )
         if callback is not None:
             d.addCallback(lambda __: callback())
         if errback is None:
@@ -534,7 +676,15 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def param_get_a(self, name, category, attribute="value", profile_key="@DEFAULT@", callback=None, errback=None):
+    def param_get_a(
+        self,
+        name,
+        category,
+        attribute="value",
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
         d = self.root.callRemote("param_get_a", name, category, attribute, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -543,8 +693,19 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def param_get_a_async(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
-        d = self.root.callRemote("param_get_a_async", name, category, attribute, security_limit, profile_key)
+    def param_get_a_async(
+        self,
+        name,
+        category,
+        attribute="value",
+        security_limit=-1,
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "param_get_a_async", name, category, attribute, security_limit, profile_key
+        )
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -552,8 +713,19 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def param_set(self, name, value, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
-        d = self.root.callRemote("param_set", name, value, category, security_limit, profile_key)
+    def param_set(
+        self,
+        name,
+        value,
+        category,
+        security_limit=-1,
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "param_set", name, value, category, security_limit, profile_key
+        )
         if callback is not None:
             d.addCallback(lambda __: callback())
         if errback is None:
@@ -561,7 +733,15 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def param_ui_get(self, security_limit=-1, app='', extra='', profile_key="@DEFAULT@", callback=None, errback=None):
+    def param_ui_get(
+        self,
+        security_limit=-1,
+        app="",
+        extra="",
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
         d = self.root.callRemote("param_ui_get", security_limit, app, extra, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -579,7 +759,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def params_register_app(self, xml, security_limit=-1, app='', callback=None, errback=None):
+    def params_register_app(
+        self, xml, security_limit=-1, app="", callback=None, errback=None
+    ):
         d = self.root.callRemote("params_register_app", xml, security_limit, app)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -606,8 +788,24 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def params_values_from_category_get_async(self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@", callback=None, errback=None):
-        d = self.root.callRemote("params_values_from_category_get_async", category, security_limit, app, extra, profile_key)
+    def params_values_from_category_get_async(
+        self,
+        category,
+        security_limit=-1,
+        app="",
+        extra="",
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
+        d = self.root.callRemote(
+            "params_values_from_category_get_async",
+            category,
+            security_limit,
+            app,
+            extra,
+            profile_key,
+        )
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -615,7 +813,15 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def presence_set(self, to_jid='', show='', statuses={}, profile_key="@DEFAULT@", callback=None, errback=None):
+    def presence_set(
+        self,
+        to_jid="",
+        show="",
+        statuses={},
+        profile_key="@DEFAULT@",
+        callback=None,
+        errback=None,
+    ):
         d = self.root.callRemote("presence_set", to_jid, show, statuses, profile_key)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -651,7 +857,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def private_data_set(self, namespace, key, data, profile_key, callback=None, errback=None):
+    def private_data_set(
+        self, namespace, key, data, profile_key, callback=None, errback=None
+    ):
         d = self.root.callRemote("private_data_set", namespace, key, data, profile_key)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -660,7 +868,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def profile_create(self, profile, password='', component='', callback=None, errback=None):
+    def profile_create(
+        self, profile, password="", component="", callback=None, errback=None
+    ):
         d = self.root.callRemote("profile_create", profile, password, component)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -678,7 +888,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def profile_is_session_started(self, profile_key="@DEFAULT@", callback=None, errback=None):
+    def profile_is_session_started(
+        self, profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("profile_is_session_started", profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -705,7 +917,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def profile_start_session(self, password='', profile_key="@DEFAULT@", callback=None, errback=None):
+    def profile_start_session(
+        self, password="", profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("profile_start_session", password, profile_key)
         if callback is not None:
             d.addCallback(callback)
@@ -714,7 +928,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def profiles_list_get(self, clients=True, components=False, callback=None, errback=None):
+    def profiles_list_get(
+        self, clients=True, components=False, callback=None, errback=None
+    ):
         d = self.root.callRemote("profiles_list_get", clients, components)
         if callback is not None:
             d.addCallback(callback)
@@ -786,7 +1002,9 @@
         else:
             d.addErrback(self._errback, ori_errback=errback)
 
-    def subscription(self, sub_type, entity, profile_key="@DEFAULT@", callback=None, errback=None):
+    def subscription(
+        self, sub_type, entity, profile_key="@DEFAULT@", callback=None, errback=None
+    ):
         d = self.root.callRemote("subscription", sub_type, entity, profile_key)
         if callback is not None:
             d.addCallback(lambda __: callback())
@@ -809,7 +1027,8 @@
 
     def register_signal(self, name, handler, iface="core"):
         async_handler = lambda *args, **kwargs: defer.Deferred.fromFuture(
-            asyncio.ensure_future(handler(*args, **kwargs)))
+            asyncio.ensure_future(handler(*args, **kwargs))
+        )
         return super().register_signal(name, async_handler, iface)
 
 
@@ -821,9 +1040,8 @@
     def _errback(self, failure_):
         """Convert Failure to BridgeException"""
         raise BridgeException(
-            name=failure_.type.decode('utf-8'),
-            message=str(failure_.value)
-            )
+            name=failure_.type.decode("utf-8"), message=str(failure_.value)
+        )
 
     def call(self, name, *args, **kwargs):
         d = self.root.callRemote(name, *args, *kwargs)
@@ -849,7 +1067,7 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def connect(self, profile_key="@DEFAULT@", password='', options={}):
+    def connect(self, profile_key="@DEFAULT@", password="", options={}):
         d = self.root.callRemote("connect", profile_key, password, options)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
@@ -889,17 +1107,37 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def disco_find_by_features(self, namespaces, identities, bare_jid=False, service=True, roster=True, own_jid=True, local_device=False, profile_key="@DEFAULT@"):
-        d = self.root.callRemote("disco_find_by_features", namespaces, identities, bare_jid, service, roster, own_jid, local_device, profile_key)
+    def disco_find_by_features(
+        self,
+        namespaces,
+        identities,
+        bare_jid=False,
+        service=True,
+        roster=True,
+        own_jid=True,
+        local_device=False,
+        profile_key="@DEFAULT@",
+    ):
+        d = self.root.callRemote(
+            "disco_find_by_features",
+            namespaces,
+            identities,
+            bare_jid,
+            service,
+            roster,
+            own_jid,
+            local_device,
+            profile_key,
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def disco_infos(self, entity_jid, node=u'', use_cache=True, profile_key="@DEFAULT@"):
+    def disco_infos(self, entity_jid, node="", use_cache=True, profile_key="@DEFAULT@"):
         d = self.root.callRemote("disco_infos", entity_jid, node, use_cache, profile_key)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def disco_items(self, entity_jid, node=u'', use_cache=True, profile_key="@DEFAULT@"):
+    def disco_items(self, entity_jid, node="", use_cache=True, profile_key="@DEFAULT@"):
         d = self.root.callRemote("disco_items", entity_jid, node, use_cache, profile_key)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
@@ -920,7 +1158,9 @@
         return d.asFuture(asyncio.get_event_loop())
 
     def encryption_trust_ui_get(self, to_jid, namespace, profile_key):
-        d = self.root.callRemote("encryption_trust_ui_get", to_jid, namespace, profile_key)
+        d = self.root.callRemote(
+            "encryption_trust_ui_get", to_jid, namespace, profile_key
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -939,8 +1179,12 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def history_get(self, from_jid, to_jid, limit, between=True, filters='', profile="@NONE@"):
-        d = self.root.callRemote("history_get", from_jid, to_jid, limit, between, filters, profile)
+    def history_get(
+        self, from_jid, to_jid, limit, between=True, filters="", profile="@NONE@"
+    ):
+        d = self.root.callRemote(
+            "history_get", from_jid, to_jid, limit, between, filters, profile
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -985,7 +1229,9 @@
         return d.asFuture(asyncio.get_event_loop())
 
     def menu_launch(self, menu_type, path, data, security_limit, profile_key):
-        d = self.root.callRemote("menu_launch", menu_type, path, data, security_limit, profile_key)
+        d = self.root.callRemote(
+            "menu_launch", menu_type, path, data, security_limit, profile_key
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -999,8 +1245,12 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def message_encryption_start(self, to_jid, namespace='', replace=False, profile_key="@NONE@"):
-        d = self.root.callRemote("message_encryption_start", to_jid, namespace, replace, profile_key)
+    def message_encryption_start(
+        self, to_jid, namespace="", replace=False, profile_key="@NONE@"
+    ):
+        d = self.root.callRemote(
+            "message_encryption_start", to_jid, namespace, replace, profile_key
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -1009,8 +1259,18 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def message_send(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@"):
-        d = self.root.callRemote("message_send", to_jid, message, subject, mess_type, extra, profile_key)
+    def message_send(
+        self,
+        to_jid,
+        message,
+        subject={},
+        mess_type="auto",
+        extra={},
+        profile_key="@NONE@",
+    ):
+        d = self.root.callRemote(
+            "message_send", to_jid, message, subject, mess_type, extra, profile_key
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -1019,8 +1279,32 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def notification_add(self, type_, body_plain, body_rich, title, is_global, requires_action, arg_6, priority, expire_at, extra):
-        d = self.root.callRemote("notification_add", type_, body_plain, body_rich, title, is_global, requires_action, arg_6, priority, expire_at, extra)
+    def notification_add(
+        self,
+        type_,
+        body_plain,
+        body_rich,
+        title,
+        is_global,
+        requires_action,
+        arg_6,
+        priority,
+        expire_at,
+        extra,
+    ):
+        d = self.root.callRemote(
+            "notification_add",
+            type_,
+            body_plain,
+            body_rich,
+            title,
+            is_global,
+            requires_action,
+            arg_6,
+            priority,
+            expire_at,
+            extra,
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -1030,7 +1314,9 @@
         return d.asFuture(asyncio.get_event_loop())
 
     def notifications_expired_clean(self, limit_timestamp, profile_key):
-        d = self.root.callRemote("notifications_expired_clean", limit_timestamp, profile_key)
+        d = self.root.callRemote(
+            "notifications_expired_clean", limit_timestamp, profile_key
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -1044,17 +1330,30 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def param_get_a_async(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@"):
-        d = self.root.callRemote("param_get_a_async", name, category, attribute, security_limit, profile_key)
+    def param_get_a_async(
+        self,
+        name,
+        category,
+        attribute="value",
+        security_limit=-1,
+        profile_key="@DEFAULT@",
+    ):
+        d = self.root.callRemote(
+            "param_get_a_async", name, category, attribute, security_limit, profile_key
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def param_set(self, name, value, category, security_limit=-1, profile_key="@DEFAULT@"):
-        d = self.root.callRemote("param_set", name, value, category, security_limit, profile_key)
+    def param_set(
+        self, name, value, category, security_limit=-1, profile_key="@DEFAULT@"
+    ):
+        d = self.root.callRemote(
+            "param_set", name, value, category, security_limit, profile_key
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def param_ui_get(self, security_limit=-1, app='', extra='', profile_key="@DEFAULT@"):
+    def param_ui_get(self, security_limit=-1, app="", extra="", profile_key="@DEFAULT@"):
         d = self.root.callRemote("param_ui_get", security_limit, app, extra, profile_key)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
@@ -1064,7 +1363,7 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def params_register_app(self, xml, security_limit=-1, app=''):
+    def params_register_app(self, xml, security_limit=-1, app=""):
         d = self.root.callRemote("params_register_app", xml, security_limit, app)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
@@ -1079,12 +1378,21 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def params_values_from_category_get_async(self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@"):
-        d = self.root.callRemote("params_values_from_category_get_async", category, security_limit, app, extra, profile_key)
+    def params_values_from_category_get_async(
+        self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@"
+    ):
+        d = self.root.callRemote(
+            "params_values_from_category_get_async",
+            category,
+            security_limit,
+            app,
+            extra,
+            profile_key,
+        )
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def presence_set(self, to_jid='', show='', statuses={}, profile_key="@DEFAULT@"):
+    def presence_set(self, to_jid="", show="", statuses={}, profile_key="@DEFAULT@"):
         d = self.root.callRemote("presence_set", to_jid, show, statuses, profile_key)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
@@ -1109,7 +1417,7 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def profile_create(self, profile, password='', component=''):
+    def profile_create(self, profile, password="", component=""):
         d = self.root.callRemote("profile_create", profile, password, component)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
@@ -1134,7 +1442,7 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def profile_start_session(self, password='', profile_key="@DEFAULT@"):
+    def profile_start_session(self, password="", profile_key="@DEFAULT@"):
         d = self.root.callRemote("profile_start_session", password, profile_key)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())