Mercurial > libervia-backend
diff libervia/backend/plugins/plugin_xep_0376.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 | 9658c534287e |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0376.py Tue Jun 18 12:06:45 2024 +0200 +++ b/libervia/backend/plugins/plugin_xep_0376.py Wed Jun 19 18:44:57 2024 +0200 @@ -73,7 +73,7 @@ nodeIdentifier: str, sub_jid: Optional[jid.JID], options: Optional[dict], - subscribe: bool + subscribe: bool, ) -> None: if sub_jid is None: sub_jid = client.jid.userhostJID() @@ -90,8 +90,7 @@ options_elt["node"] = nodeIdentifier options_elt["jid"] = sub_jid.full() form = data_form.Form( - formType='submit', - formNamespace=pubsub.NS_PUBSUB_SUBSCRIBE_OPTIONS + formType="submit", formNamespace=pubsub.NS_PUBSUB_SUBSCRIBE_OPTIONS ) form.makeFields(options) options_elt.addChild(form.toElement()) @@ -104,7 +103,7 @@ service: jid.JID, nodeIdentifier: str, sub_jid: Optional[jid.JID] = None, - options: Optional[dict] = None + options: Optional[dict] = None, ) -> Tuple[bool, Optional[pubsub.Subscription]]: if not self.host.hasFeature(client, NS_PAM) or client.is_component: return True, None @@ -161,7 +160,7 @@ ("service", "service"), ("node", "node"), ("jid", "subscriber"), - ("subscription", "state") + ("subscription", "state"), ): sub[key] = subscription_elt[attr] except KeyError as e: