core: minor style improvments

This commit is contained in:
Goffi 2019-03-27 21:15:25 +01:00
commit 1a958d8744
3 changed files with 6 additions and 13 deletions

View file

@ -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

View file

@ -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()

View file

@ -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: