From e89dfccf739d068020a2eda2a52b34327afd6748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 18 Sep 2018 15:45:39 +0200 Subject: [PATCH] Fix pylint errors - bad-mcs-method-argument - trailing-newlines - no-self-argument --- gajim/cell_renderer_image.py | 4 +-- gajim/command_system/dispatcher.py | 32 +++++++++---------- .../command_system/implementation/standard.py | 1 - 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/gajim/cell_renderer_image.py b/gajim/cell_renderer_image.py index 271af8b9e..e26c4f493 100644 --- a/gajim/cell_renderer_image.py +++ b/gajim/cell_renderer_image.py @@ -42,11 +42,11 @@ class CellRendererImage(Gtk.CellRendererPixbuf): def do_get_property(self, pspec): return getattr(self, pspec.name) - def do_activate(event, widget, path, bg_area, cell_area, flags): + def do_activate(self, *args, **kwargs): """Renderers cannot be activated; always return True.""" return True - def do_editing_started(event, widget, path, fb_area, cell_area, flags): + def do_editing_started(self, *args, **kwargs): """Renderers cannot be edited; always return None.""" return None diff --git a/gajim/command_system/dispatcher.py b/gajim/command_system/dispatcher.py index 11de2ea70..dbf032885 100644 --- a/gajim/command_system/dispatcher.py +++ b/gajim/command_system/dispatcher.py @@ -104,32 +104,32 @@ def list_commands(host): class Dispatchable(type): # pylint: disable=no-value-for-parameter - def __init__(self, name, bases, namespace): - parents = super(Dispatchable, self) + def __init__(cls, name, bases, namespace): + parents = super(Dispatchable, cls) parents.__init__(name, bases, namespace) if not is_root(namespace): - self.dispatch() + cls.dispatch() - def dispatch(self): - if self.AUTOMATIC: - self.enable() + def dispatch(cls): + if cls.AUTOMATIC: + cls.enable() class Host(Dispatchable): - def enable(self): - add_host(self) + def enable(cls): + add_host(cls) - def disable(self): - remove_host(self) + def disable(cls): + remove_host(cls) class Container(Dispatchable): - def enable(self): - add_container(self) - add_commands(self) + def enable(cls): + add_container(cls) + add_commands(cls) - def disable(self): - remove_commands(self) - remove_container(self) + def disable(cls): + remove_commands(cls) + remove_container(cls) diff --git a/gajim/command_system/implementation/standard.py b/gajim/command_system/implementation/standard.py index 13ad3b8d5..863486ca8 100644 --- a/gajim/command_system/implementation/standard.py +++ b/gajim/command_system/implementation/standard.py @@ -400,4 +400,3 @@ class StandardGroupChatCommands(CommandContainer): raise CommandError(_('Command is not supported for zeroconf accounts')) gc_c = app.contacts.get_gc_contact(self.account, self.room_jid, nick) app.connections[self.account].get_module('Ping').send_ping(gc_c) -