From e3abdf99015806a4078a946aef1294efd60eb6af Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 16 Mar 2017 22:13:31 +0000 Subject: [PATCH] Use super class call where possible --- deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py | 2 +- deluge/plugins/Stats/deluge/plugins/stats/gtkui.py | 2 +- deluge/ui/console/modes/torrentlist/search_mode.py | 2 +- deluge/ui/console/modes/torrentlist/torrentview.py | 2 +- deluge/ui/console/widgets/inputpane.py | 2 +- deluge/ui/gtkui/details_tab.py | 2 +- deluge/ui/gtkui/files_tab.py | 2 +- deluge/ui/gtkui/options_tab.py | 2 +- deluge/ui/gtkui/path_chooser.py | 2 +- deluge/ui/gtkui/peers_tab.py | 2 +- deluge/ui/gtkui/piecesbar.py | 2 +- deluge/ui/gtkui/status_tab.py | 2 +- deluge/ui/gtkui/trackers_tab.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py index 5f4ef9351..217525d34 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py +++ b/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py @@ -30,7 +30,7 @@ DAYS = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] class SchedulerSelectWidget(gtk.DrawingArea): def __init__(self, hover): - gtk.DrawingArea.__init__(self) + super(SchedulerSelectWidget, self).__init__() self.set_events(gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK | gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.LEAVE_NOTIFY_MASK) diff --git a/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py b/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py index ea2641680..a9b8452a0 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py +++ b/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py @@ -80,7 +80,7 @@ def gtk_to_graph_color(color): class GraphsTab(Tab): def __init__(self, glade, colors): - Tab.__init__(self) + super(GraphsTab, self).__init__() self.glade = glade self.window = self.glade.get_widget('graph_tab') self.notebook = self.glade.get_widget('graph_notebook') diff --git a/deluge/ui/console/modes/torrentlist/search_mode.py b/deluge/ui/console/modes/torrentlist/search_mode.py index dab353bfd..2196b78c7 100644 --- a/deluge/ui/console/modes/torrentlist/search_mode.py +++ b/deluge/ui/console/modes/torrentlist/search_mode.py @@ -50,7 +50,7 @@ SEARCH_FORMAT = { class SearchMode(InputKeyHandler): def __init__(self, torrentlist): - InputKeyHandler.__init__(self) + super(SearchMode, self).__init__() self.torrentlist = torrentlist self.torrentview = torrentlist.torrentview self.search_state = SEARCH_EMPTY diff --git a/deluge/ui/console/modes/torrentlist/torrentview.py b/deluge/ui/console/modes/torrentlist/torrentview.py index af4b88147..7d728da5e 100644 --- a/deluge/ui/console/modes/torrentlist/torrentview.py +++ b/deluge/ui/console/modes/torrentlist/torrentview.py @@ -98,7 +98,7 @@ for col_i, col_name in enumerate(torrentviewcolumns.column_pref_names): class TorrentView(InputKeyHandler): def __init__(self, torrentlist, config): - InputKeyHandler.__init__(self) + super(TorrentView, self).__init__() self.torrentlist = torrentlist self.config = config self.filter_dict = {} diff --git a/deluge/ui/console/widgets/inputpane.py b/deluge/ui/console/widgets/inputpane.py index cf53b48ea..775c4f79f 100644 --- a/deluge/ui/console/widgets/inputpane.py +++ b/deluge/ui/console/widgets/inputpane.py @@ -33,7 +33,7 @@ class BaseInputPane(InputKeyHandler): def __init__(self, mode, allow_rearrange=False, immediate_action=False, set_first_input_active=True, border_off_west=0, border_off_north=0, border_off_east=0, border_off_south=0, active_wrap=False, **kwargs): - InputKeyHandler.__init__(self) + super(BaseInputPane, self).__init__() self.inputs = [] self.mode = mode self.active_input = 0 diff --git a/deluge/ui/gtkui/details_tab.py b/deluge/ui/gtkui/details_tab.py index 19b1133da..778173ea6 100644 --- a/deluge/ui/gtkui/details_tab.py +++ b/deluge/ui/gtkui/details_tab.py @@ -22,7 +22,7 @@ log = logging.getLogger(__name__) class DetailsTab(Tab): def __init__(self): - Tab.__init__(self) + super(DetailsTab, self).__init__() # Get the labels we need to update. # widget name, modifier function, status keys main_builder = component.get('MainWindow').get_builder() diff --git a/deluge/ui/gtkui/files_tab.py b/deluge/ui/gtkui/files_tab.py index 2eab50ad4..b2ccc7c31 100644 --- a/deluge/ui/gtkui/files_tab.py +++ b/deluge/ui/gtkui/files_tab.py @@ -70,7 +70,7 @@ def cell_progress(column, cell, model, row, data): class FilesTab(Tab): def __init__(self): - Tab.__init__(self) + super(FilesTab, self).__init__() main_builder = component.get('MainWindow').get_builder() self._name = 'Files' diff --git a/deluge/ui/gtkui/options_tab.py b/deluge/ui/gtkui/options_tab.py index a0713dbfe..1015f55cf 100644 --- a/deluge/ui/gtkui/options_tab.py +++ b/deluge/ui/gtkui/options_tab.py @@ -19,7 +19,7 @@ from deluge.ui.gtkui.torrentdetails import Tab class OptionsTab(Tab): def __init__(self): - Tab.__init__(self) + super(OptionsTab, self).__init__() main_builder = component.get('MainWindow').get_builder() self._name = 'Options' diff --git a/deluge/ui/gtkui/path_chooser.py b/deluge/ui/gtkui/path_chooser.py index 35df8ae72..b96958d2f 100644 --- a/deluge/ui/gtkui/path_chooser.py +++ b/deluge/ui/gtkui/path_chooser.py @@ -118,7 +118,7 @@ class PathChooser(PathChooserComboBox): def __init__(self, paths_config_key=None): self.paths_config_key = paths_config_key - PathChooserComboBox.__init__(self) + super(PathChooser, self).__init__() self.chooser_handler = PathChoosersHandler() self.chooser_handler.register_chooser(self) self.set_auto_completer_func(self.on_completion) diff --git a/deluge/ui/gtkui/peers_tab.py b/deluge/ui/gtkui/peers_tab.py index c86195967..e95916bec 100644 --- a/deluge/ui/gtkui/peers_tab.py +++ b/deluge/ui/gtkui/peers_tab.py @@ -30,7 +30,7 @@ log = logging.getLogger(__name__) class PeersTab(Tab): def __init__(self): - Tab.__init__(self) + super(PeersTab, self).__init__() main_builder = component.get('MainWindow').get_builder() self._name = 'Peers' diff --git a/deluge/ui/gtkui/piecesbar.py b/deluge/ui/gtkui/piecesbar.py index d93229c5f..43c7c7080 100644 --- a/deluge/ui/gtkui/piecesbar.py +++ b/deluge/ui/gtkui/piecesbar.py @@ -27,7 +27,7 @@ class PiecesBar(DrawingArea): __gsignals__ = {b'expose-event': b'override'} def __init__(self): - DrawingArea.__init__(self) + super(PiecesBar, self).__init__() # Get progress bar styles, in order to keep font consistency pb = ProgressBar() pb_style = pb.get_style() diff --git a/deluge/ui/gtkui/status_tab.py b/deluge/ui/gtkui/status_tab.py index 3d2b995d9..c9dd53ed2 100644 --- a/deluge/ui/gtkui/status_tab.py +++ b/deluge/ui/gtkui/status_tab.py @@ -24,7 +24,7 @@ log = logging.getLogger(__name__) class StatusTab(Tab): def __init__(self): - Tab.__init__(self) + super(StatusTab, self).__init__() # Get the labels we need to update. # widget name, modifier function, status keys main_builder = component.get('MainWindow').get_builder() diff --git a/deluge/ui/gtkui/trackers_tab.py b/deluge/ui/gtkui/trackers_tab.py index f8cfdadb0..82f08ba7f 100644 --- a/deluge/ui/gtkui/trackers_tab.py +++ b/deluge/ui/gtkui/trackers_tab.py @@ -21,7 +21,7 @@ log = logging.getLogger(__name__) class TrackersTab(Tab): def __init__(self): - Tab.__init__(self) + super(TrackersTab, self).__init__() # Get the labels we need to update. # widget name, modifier function, status keys main_builder = component.get('MainWindow').get_builder()