changeset 2879:5ba98fd6c9a4

core: minor style improvments
author Goffi <goffi@goffi.org>
date Wed, 27 Mar 2019 21:15:25 +0100
parents a02ad4bc0a6d
children dd650f3e070f
files sat/core/sat_main.py sat/plugins/plugin_xep_0048.py sat_frontends/tools/xmlui.py
diffstat 3 files changed, 6 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/sat/core/sat_main.py	Mon Mar 25 18:40:12 2019 +0100
+++ b/sat/core/sat_main.py	Wed Mar 27 21:15:25 2019 +0100
@@ -1302,20 +1302,13 @@
 
         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
--- a/sat/plugins/plugin_xep_0048.py	Mon Mar 25 18:40:12 2019 +0100
+++ b/sat/plugins/plugin_xep_0048.py	Wed Mar 27 21:15:25 2019 +0100
@@ -298,7 +298,7 @@
                 )
                 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()
--- a/sat_frontends/tools/xmlui.py	Mon Mar 25 18:40:12 2019 +0100
+++ b/sat_frontends/tools/xmlui.py	Wed Mar 27 21:15:25 2019 +0100
@@ -885,7 +885,7 @@
             )
             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: