Fix pylint errors
- bad-mcs-method-argument - trailing-newlines - no-self-argument
This commit is contained in:
		
							parent
							
								
									99efc4a9b4
								
							
						
					
					
						commit
						e89dfccf73
					
				
					 3 changed files with 18 additions and 19 deletions
				
			
		|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
|  | @ -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) | ||||
|  |  | |||
|  | @ -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) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue