diff options
Diffstat (limited to 'deluge/plugins/Stats/deluge_stats/gtkui.py')
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/gtkui.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/deluge/plugins/Stats/deluge_stats/gtkui.py b/deluge/plugins/Stats/deluge_stats/gtkui.py index 75e3015..c088060 100644 --- a/deluge/plugins/Stats/deluge_stats/gtkui.py +++ b/deluge/plugins/Stats/deluge_stats/gtkui.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2009 Ian Martin <ianmartin@cantab.net> # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> @@ -12,8 +11,6 @@ # See LICENSE for more details. # -from __future__ import division, unicode_literals - import logging from gi.repository import Gtk @@ -85,7 +82,7 @@ def text_to_rgba(color): class GraphsTab(Tab): def __init__(self, colors): - super(GraphsTab, self).__init__() + super().__init__() builder = Gtk.Builder() builder.add_from_file(get_resource('tabs.ui')) @@ -270,7 +267,7 @@ class GtkUI(Gtk3PluginBase): for graph, colors in self.config['colors'].items(): gtkconf[graph] = {} for value, color in colors.items(): - color_btn = self.builder.get_object('%s_%s_color' % (graph, value)) + color_btn = self.builder.get_object(f'{graph}_{value}_color') try: gtkconf[graph][value] = color_btn.get_color().to_string() except Exception: @@ -285,7 +282,7 @@ class GtkUI(Gtk3PluginBase): for graph, colors in self.config['colors'].items(): for value, color in colors.items(): try: - color_btn = self.builder.get_object('%s_%s_color' % (graph, value)) + color_btn = self.builder.get_object(f'{graph}_{value}_color') color_btn.set_rgba(text_to_rgba(color)) except Exception as ex: log.debug('Unable to set %s %s %s: %s', graph, value, color, ex) |