From 12ede4d3019a611b3b58d245d65c52bc01f37046 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 13 Jan 2018 15:33:19 +0100 Subject: yapf -ir --- poezio/core/commands.py | 7 ++++--- poezio/core/completions.py | 9 +++++---- poezio/core/core.py | 3 +-- poezio/core/handlers.py | 11 ++++++----- 4 files changed, 16 insertions(+), 14 deletions(-) (limited to 'poezio/core') diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 91d98030..a6d8bcbb 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -407,7 +407,8 @@ class CommandCore: tab.join() if config.get('bookmark_on_join'): - method = 'remote' if config.get('use_remote_bookmarks') else 'local' + method = 'remote' if config.get( + 'use_remote_bookmarks') else 'local' self._add_bookmark('%s/%s' % (room, nick), True, password, method) if tab == self.core.current_tab(): @@ -912,8 +913,8 @@ class CommandCore: self.core.xmpp.remove_handler('Iq %s' % iq_id) self.core.xmpp.register_handler( - Callback('Iq %s' % iq_id, - StanzaPath('iq@id=%s' % iq_id), iqfunc)) + Callback('Iq %s' % iq_id, StanzaPath('iq@id=%s' % iq_id), + iqfunc)) stanza.send() except: self.core.information('Could not send custom stanza', 'Error') diff --git a/poezio/core/completions.py b/poezio/core/completions.py index 12f0b4a1..c86e3514 100644 --- a/poezio/core/completions.py +++ b/poezio/core/completions.py @@ -51,7 +51,8 @@ class CompletionCore: if tab is not None and tab.joined: to_suggest.append(bookmark.jid) return Completion( - the_input.auto_completion, roster.jids() + to_suggest, + the_input.auto_completion, + roster.jids() + to_suggest, '', quotify=True) elif arg == 2: @@ -275,9 +276,9 @@ class CompletionCore: (roster[jid].resources for jid in roster.jids() if len(roster[jid])), []) comp = sorted(comp) - bares = sorted( - roster[contact].bare_jid for contact in roster.jids() - if len(roster[contact])) + bares = sorted(roster[contact].bare_jid + for contact in roster.jids() + if len(roster[contact])) off = sorted(jid for jid in roster.jids() if jid not in bares) comp = comp + bares + off return Completion(the_input.new_completion, comp, n, quotify=True) diff --git a/poezio/core/core.py b/poezio/core/core.py index 64ded385..9d2d0856 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -269,8 +269,7 @@ class Core(object): self.xmpp.add_event_handler('carbon_sent', self.handler.on_carbon_sent) self.xmpp.add_event_handler('http_confirm', self.handler.http_confirm) - all_stanzas = Callback('custom matcher', - connection.MatchAll(None), + all_stanzas = Callback('custom matcher', connection.MatchAll(None), self.handler.incoming_stanza) self.xmpp.register_handler(all_stanzas) if config.get('enable_avatars'): diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index f1a8bcb9..a7a0797b 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -1078,11 +1078,12 @@ class HandlerCore: roster.modified() if not logger.log_roster_change(jid.bare, 'got online'): self.core.information('Unable to write in the log file', 'Error') - resource = Resource(jid.full, { - 'priority': presence.get_priority() or 0, - 'status': presence['status'], - 'show': presence['show'], - }) + resource = Resource( + jid.full, { + 'priority': presence.get_priority() or 0, + 'status': presence['status'], + 'show': presence['show'], + }) self.core.events.trigger('normal_presence', presence, resource) name = contact.name if contact.name else jid.bare self.core.add_information_message_to_conversation_tab( -- cgit v1.2.3