diff options
Diffstat (limited to 'deluge/plugins/Label/deluge_label/gtkui')
4 files changed, 7 insertions, 19 deletions
diff --git a/deluge/plugins/Label/deluge_label/gtkui/__init__.py b/deluge/plugins/Label/deluge_label/gtkui/__init__.py index eeaeadc..6170716 100644 --- a/deluge/plugins/Label/deluge_label/gtkui/__init__.py +++ b/deluge/plugins/Label/deluge_label/gtkui/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # @@ -7,8 +6,6 @@ # See LICENSE for more details. # -from __future__ import unicode_literals - import logging from deluge import component # for systray diff --git a/deluge/plugins/Label/deluge_label/gtkui/label_config.py b/deluge/plugins/Label/deluge_label/gtkui/label_config.py index b1bf56d..26c827e 100644 --- a/deluge/plugins/Label/deluge_label/gtkui/label_config.py +++ b/deluge/plugins/Label/deluge_label/gtkui/label_config.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # @@ -7,8 +6,6 @@ # See LICENSE for more details. # -from __future__ import unicode_literals - import logging from gi.repository.Gtk import Builder @@ -20,7 +17,7 @@ from ..common import get_resource log = logging.getLogger(__name__) -class LabelConfig(object): +class LabelConfig: """ there used to be some options here... """ diff --git a/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py b/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py index 34358db..da18302 100644 --- a/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py +++ b/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com> @@ -8,13 +7,11 @@ # See LICENSE for more details. # -from __future__ import unicode_literals - import logging import gi # isort:skip (Required before Gtk import). -gi.require_version('Gtk', '3.0') # NOQA: E402 +gi.require_version('Gtk', '3.0') # isort:imports-thirdparty from gi.repository import Gtk @@ -32,7 +29,7 @@ NO_LABEL = 'No Label' # menu -class LabelSidebarMenu(object): +class LabelSidebarMenu: def __init__(self): self.treeview = component.get('FilterTreeView') @@ -90,7 +87,7 @@ class LabelSidebarMenu(object): for item in self.items: item.set_sensitive(sensitive) - # add is allways enabled. + # add is always enabled. self.item_add.set_sensitive(True) else: # not a label -->hide everything. @@ -107,7 +104,7 @@ class LabelSidebarMenu(object): # dialogs: -class AddDialog(object): +class AddDialog: def __init__(self): pass @@ -129,7 +126,7 @@ class AddDialog(object): self.dialog.destroy() -class OptionsDialog(object): +class OptionsDialog: spin_ids = ['max_download_speed', 'max_upload_speed', 'stop_ratio'] spin_int_ids = ['max_upload_slots', 'max_connections'] chk_ids = [ @@ -174,7 +171,7 @@ class OptionsDialog(object): self.builder.connect_signals(self) # Show the label name in the header label self.builder.get_object('label_header').set_markup( - '<b>%s:</b> %s' % (_('Label Options'), self.label) + '<b>{}:</b> {}'.format(_('Label Options'), self.label) ) for chk_id, group in self.sensitive_groups: diff --git a/deluge/plugins/Label/deluge_label/gtkui/submenu.py b/deluge/plugins/Label/deluge_label/gtkui/submenu.py index c5f80e7..ba9324b 100644 --- a/deluge/plugins/Label/deluge_label/gtkui/submenu.py +++ b/deluge/plugins/Label/deluge_label/gtkui/submenu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # @@ -8,8 +7,6 @@ # -from __future__ import unicode_literals - import logging from gi.repository.Gtk import Menu, MenuItem |