Fix trailing-whitespace pylint errors

This commit is contained in:
Philipp Hörist 2018-09-18 13:38:22 +02:00 committed by Philipp Hörist
parent e842298724
commit f12dfb811d
8 changed files with 20 additions and 19 deletions

View File

@ -812,8 +812,9 @@ class ChatControl(ChatControlBase):
if obj.kind == KindConstant.CHAT_MSG_SENT:
kind = 'outgoing'
self.print_conversation(obj.msgtxt, kind, tim=obj.timestamp,
encrypted=obj.encrypted, correct_id=obj.correct_id,
self.print_conversation(
obj.msgtxt, kind, tim=obj.timestamp,
encrypted=obj.encrypted, correct_id=obj.correct_id,
msg_stanza_id=obj.message_id, additional_data=obj.additional_data)
def _nec_decrypted_message_received(self, obj):
@ -1039,7 +1040,7 @@ class ChatControl(ChatControlBase):
def prepare_context_menu(self, hide_buttonbar_items=False):
"""
Set compact view menuitem active state sets active and sensitivity state
for history_menuitem (False for tranasports) and file_transfer_menuitem
for history_menuitem (False for tranasports) and file_transfer_menuitem
and hide()/show() for add_to_roster_menuitem
"""
if app.jid_is_transport(self.contact.jid):

View File

@ -576,7 +576,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
if (event.get_state() & Gdk.ModifierType.CONTROL_MASK and keycode in (
self.keycode_c, self.keycode_ins)):
return False
if event.get_state() & Gdk.ModifierType.SHIFT_MASK and \
event.keyval in (Gdk.KEY_Page_Down, Gdk.KEY_Page_Up):
self._on_scroll(None, event.keyval)

View File

@ -603,7 +603,7 @@ class Connection(CommonConnection, ConnectionHandlers):
if warn:
log.warning('only bare JID available')
# This returns the bare jid
# This returns the bare jid
return nbxmpp.JID(app.get_jid_from_account(self.name))
def reconnect(self):

View File

@ -669,16 +669,16 @@ class ConnectionTypeEvent(nec.NetworkIncomingEvent):
class StanzaReceivedEvent(nec.NetworkIncomingEvent):
name = 'stanza-received'
def init(self):
self.additional_data = {}
def generate(self):
return True
class StanzaSentEvent(nec.NetworkIncomingEvent):
name = 'stanza-sent'
def init(self):
self.additional_data = {}

View File

@ -1187,7 +1187,7 @@ class ConversationTextview(GObject.GObject):
text_tags.append('outgoingtxt')
self.print_subject(subject, iter_=iter_)
iter_ = self.print_real_text(text, text_tags, name, xhtml, graphics=graphics,
mark=insert_mark, additional_data=additional_data)

View File

@ -637,7 +637,7 @@ class SingleForm(Gtk.Table):
try:
newtext = helpers.parse_jid(newtext)
except helpers.InvalidFormat as s:
app.interface.raise_dialog('invalid-jid-with-error', str(s))
app.interface.raise_dialog('invalid-jid-with-error', str(s))
return
if newtext in field.values:
app.interface.raise_dialog('jid-in-list')

View File

@ -151,17 +151,17 @@ class PluginManager(metaclass=Singleton):
@log_calls('PluginManager')
def remove_plugin(self, plugin):
'''
removes the plugin from the plugin list and deletes all loaded modules
removes the plugin from the plugin list and deletes all loaded modules
from sys. This way we will have a fresh start when the plugin gets added
again.
'''
if plugin.active:
self.deactivate_plugin(plugin)
self.plugins.remove(plugin)
# remove modules from cache
base_package = plugin.__module__.split('.')[0]
base_package = plugin.__module__.split('.')[0]
# get the subpackages/-modules of the base_package. Add a dot to the
# name to avoid name problems (removing module_abc if base_package is
# module_ab)
@ -170,10 +170,10 @@ class PluginManager(metaclass=Singleton):
# remove the base_package itself
if base_package in sys.modules:
modules_to_remove.append(base_package)
for module_to_remove in modules_to_remove:
del sys.modules[module_to_remove]
del sys.modules[module_to_remove]
@log_calls('PluginManager')
def add_plugins(self, plugin_classes):
for plugin_class in plugin_classes:

View File

@ -4021,7 +4021,7 @@ class RosterWindow:
# account = row[Column.ACCOUNT]
# self._last_selected_contact.append((jid, account))
# GLib.idle_add(self.draw_contact, jid, account, True)
def on_service_disco_menuitem_activate(self, widget, account):
server_jid = app.config.get_per('accounts', account, 'hostname')
@ -5583,7 +5583,7 @@ class RosterWindow:
if typ in ('contact', 'self_contact'):
contacts = app.contacts.get_contacts(account, jid)
for c in contacts:
if c.show not in ('offline', 'error'):
connected_contacts.append(c)