Use super class call where possible

This commit is contained in:
Calum Lind 2017-03-16 22:13:31 +00:00
parent af7e83bc76
commit e3abdf9901
13 changed files with 13 additions and 13 deletions

View File

@ -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)

View File

@ -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')

View File

@ -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

View File

@ -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 = {}

View File

@ -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

View File

@ -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()

View File

@ -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'

View File

@ -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'

View File

@ -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)

View File

@ -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'

View File

@ -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()

View File

@ -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()

View File

@ -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()