From 1a958d87444be897320d1c24804fa34f43af8ed3 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 27 Mar 2019 21:15:25 +0100 Subject: [PATCH] core: minor style improvments --- sat/core/sat_main.py | 15 ++++----------- sat/plugins/plugin_xep_0048.py | 2 +- sat_frontends/tools/xmlui.py | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/sat/core/sat_main.py b/sat/core/sat_main.py index 5aae9fc2..64d0024d 100644 --- a/sat/core/sat_main.py +++ b/sat/core/sat_main.py @@ -1302,20 +1302,13 @@ class SAT(service.Service): return ret - def _launchMenu( - self, - menu_type, - path, - data=None, - security_limit=C.NO_SECURITY_LIMIT, - profile_key=C.PROF_KEY_NONE, - ): + def _launchMenu(self, menu_type, path, data=None, security_limit=C.NO_SECURITY_LIMIT, + profile_key=C.PROF_KEY_NONE): client = self.getClient(profile_key) return self.launchMenu(client, menu_type, path, data, security_limit) - def launchMenu( - self, client, menu_type, path, data=None, security_limit=C.NO_SECURITY_LIMIT - ): + def launchMenu(self, client, menu_type, path, data=None, + security_limit=C.NO_SECURITY_LIMIT): """launch action a menu action @param menu_type(unicode): type of menu to launch diff --git a/sat/plugins/plugin_xep_0048.py b/sat/plugins/plugin_xep_0048.py index 3628af19..ec57b3f7 100644 --- a/sat/plugins/plugin_xep_0048.py +++ b/sat/plugins/plugin_xep_0048.py @@ -298,7 +298,7 @@ class XEP_0048(object): ) xmlui.addText(data.get("name", "")) xmlui.addJid(room_jid) - if data.get("autojoin", "false") == "true": + if C.bool(data.get("autojoin", C.BOOL_FALSE)): xmlui.addText("autojoin") else: xmlui.addEmpty() diff --git a/sat_frontends/tools/xmlui.py b/sat_frontends/tools/xmlui.py index 43c99e31..e95f6c1a 100644 --- a/sat_frontends/tools/xmlui.py +++ b/sat_frontends/tools/xmlui.py @@ -885,7 +885,7 @@ class XMLUIPanel(XMLUIBase): ) self._xmluiClose() - def onFormCancelled(self, ignore=None): + def onFormCancelled(self, *__): """Called when a form is cancelled""" log.debug(_("Cancelling form")) if self.submit_id is not None: