summaryrefslogtreecommitdiffstats
path: root/deluge/plugins/pluginbase.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 15:05:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 15:05:49 +0000
commitd395bd510fa4f4376dc5237ab2f8d190a920d35d (patch)
tree3e3b16b44064938be801aede14381562bae14f6a /deluge/plugins/pluginbase.py
parentAdding upstream version 2.0.3. (diff)
downloaddeluge-d395bd510fa4f4376dc5237ab2f8d190a920d35d.tar.xz
deluge-d395bd510fa4f4376dc5237ab2f8d190a920d35d.zip
Adding upstream version 2.1.1.upstream/2.1.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/plugins/pluginbase.py')
-rw-r--r--deluge/plugins/pluginbase.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/deluge/plugins/pluginbase.py b/deluge/plugins/pluginbase.py
index e80199d..5dda2f0 100644
--- a/deluge/plugins/pluginbase.py
+++ b/deluge/plugins/pluginbase.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2010 Andrew Resch <andrewresch@gmail.com>
#
@@ -7,8 +6,6 @@
# See LICENSE for more details.
#
-from __future__ import unicode_literals
-
import logging
import deluge.component as component
@@ -21,7 +18,7 @@ class PluginBase(component.Component):
update_interval = 1
def __init__(self, name):
- super(PluginBase, self).__init__(name, self.update_interval)
+ super().__init__(name, self.update_interval)
def enable(self):
raise NotImplementedError('Need to define an enable method!')
@@ -32,7 +29,7 @@ class PluginBase(component.Component):
class CorePluginBase(PluginBase):
def __init__(self, plugin_name):
- super(CorePluginBase, self).__init__('CorePlugin.' + plugin_name)
+ super().__init__('CorePlugin.' + plugin_name)
# Register RPC methods
component.get('RPCServer').register_object(self, plugin_name.lower())
log.debug('CorePlugin initialized..')
@@ -41,22 +38,22 @@ class CorePluginBase(PluginBase):
component.get('RPCServer').deregister_object(self)
def enable(self):
- super(CorePluginBase, self).enable()
+ super().enable()
def disable(self):
- super(CorePluginBase, self).disable()
+ super().disable()
class Gtk3PluginBase(PluginBase):
def __init__(self, plugin_name):
- super(Gtk3PluginBase, self).__init__('Gtk3Plugin.' + plugin_name)
+ super().__init__('Gtk3Plugin.' + plugin_name)
log.debug('Gtk3Plugin initialized..')
def enable(self):
- super(Gtk3PluginBase, self).enable()
+ super().enable()
def disable(self):
- super(Gtk3PluginBase, self).disable()
+ super().disable()
class WebPluginBase(PluginBase):
@@ -68,7 +65,7 @@ class WebPluginBase(PluginBase):
debug_stylesheets = []
def __init__(self, plugin_name):
- super(WebPluginBase, self).__init__('WebPlugin.' + plugin_name)
+ super().__init__('WebPlugin.' + plugin_name)
# Register JSON rpc methods
component.get('JSON').register_object(self, plugin_name.lower())