summaryrefslogtreecommitdiffstats
path: root/deluge/ui
diff options
context:
space:
mode:
authorCalum Lind <calumlind@gmail.com>2016-11-16 22:18:18 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2016-11-17 12:19:41 +0000
commit36cbfa8c618f86bcb6c08c52095be83c10c976a3 (patch)
tree6a6893d2f991b86953c181b0e348528b1347a411 /deluge/ui
parent2657cc39218d6ec3b5a7b5f9a462a8262e7404d5 (diff)
downloaddeluge-36cbfa8c618f86bcb6c08c52095be83c10c976a3.tar.gz
deluge-36cbfa8c618f86bcb6c08c52095be83c10c976a3.tar.bz2
deluge-36cbfa8c618f86bcb6c08c52095be83c10c976a3.zip
[Lint] Fix files to pass Flake8 v3.2.0
Diffstat (limited to 'deluge/ui')
-rw-r--r--deluge/ui/client.py1
-rw-r--r--deluge/ui/common.py1
-rw-r--r--deluge/ui/console/utils/format_utils.py2
-rw-r--r--deluge/ui/gtkui/common.py1
-rw-r--r--deluge/ui/gtkui/files_tab.py2
-rwxr-xr-xdeluge/ui/gtkui/path_combo_chooser.py2
-rw-r--r--deluge/ui/gtkui/torrentview_data_funcs.py1
-rw-r--r--deluge/ui/tracker_icons.py1
-rw-r--r--deluge/ui/web/common.py1
9 files changed, 10 insertions, 2 deletions
diff --git a/deluge/ui/client.py b/deluge/ui/client.py
index 6c95646e9..bcd4a52d8 100644
--- a/deluge/ui/client.py
+++ b/deluge/ui/client.py
@@ -784,5 +784,6 @@ class Client(object):
def auth_levels_mapping_reverse(self):
return self._daemon_proxy.auth_levels_mapping_reverse
+
# This is the object clients will use
client = Client()
diff --git a/deluge/ui/common.py b/deluge/ui/common.py
index 686963aee..fc0fdd653 100644
--- a/deluge/ui/common.py
+++ b/deluge/ui/common.py
@@ -32,6 +32,7 @@ log = logging.getLogger(__name__)
def _(message):
return message
+
STATE_TRANSLATION = {
'All': _('All'),
'Active': _('Active'),
diff --git a/deluge/ui/console/utils/format_utils.py b/deluge/ui/console/utils/format_utils.py
index 6d08cde6c..4a26420fc 100644
--- a/deluge/ui/console/utils/format_utils.py
+++ b/deluge/ui/console/utils/format_utils.py
@@ -121,8 +121,8 @@ def format_column(col, lim):
def format_row(row, column_widths):
return ''.join([format_column(row[i], column_widths[i]) for i in range(0, len(row))])
-_strip_re = re.compile('\\{!.*?!\\}')
+_strip_re = re.compile('\\{!.*?!\\}')
_format_code = re.compile(r'\{\|(.*)\|\}')
diff --git a/deluge/ui/gtkui/common.py b/deluge/ui/gtkui/common.py
index 97943ee91..cd785269f 100644
--- a/deluge/ui/gtkui/common.py
+++ b/deluge/ui/gtkui/common.py
@@ -37,6 +37,7 @@ def get_pixbuf(filename):
log.warning(ex)
return create_blank_pixbuf()
+
# Status icons.. Create them from file only once to avoid constantly re-creating them.
icon_downloading = get_pixbuf('downloading16.png')
icon_seeding = get_pixbuf('seeding16.png')
diff --git a/deluge/ui/gtkui/files_tab.py b/deluge/ui/gtkui/files_tab.py
index 00e5c6884..9a36c6356 100644
--- a/deluge/ui/gtkui/files_tab.py
+++ b/deluge/ui/gtkui/files_tab.py
@@ -31,13 +31,13 @@ log = logging.getLogger(__name__)
def _(message):
return message
+
TRANSLATE = {
'Do Not Download': _('Do Not Download'),
'Normal Priority': _('Normal Priority'),
'High Priority': _('High Priority'),
'Highest Priority': _('Highest Priority'),
}
-
del _
diff --git a/deluge/ui/gtkui/path_combo_chooser.py b/deluge/ui/gtkui/path_combo_chooser.py
index ff07d7274..331671121 100755
--- a/deluge/ui/gtkui/path_combo_chooser.py
+++ b/deluge/ui/gtkui/path_combo_chooser.py
@@ -1484,8 +1484,10 @@ class PathChooserComboBox(gtk.HBox, StoredValuesPopup, GObject):
'on_show_hidden_files_checkbutton_toggled': on_show_hidden_files_toggled,
}
+
type_register(PathChooserComboBox)
+
if __name__ == '__main__':
import sys
w = gtk.Window()
diff --git a/deluge/ui/gtkui/torrentview_data_funcs.py b/deluge/ui/gtkui/torrentview_data_funcs.py
index 894a9beaa..f0a0bbdc5 100644
--- a/deluge/ui/gtkui/torrentview_data_funcs.py
+++ b/deluge/ui/gtkui/torrentview_data_funcs.py
@@ -263,6 +263,7 @@ def cell_data_date(column, cell, model, row, data, key):
date_str = common.fdate(date, date_only=True) if date > 0 else ''
cell.set_property('text', date_str)
+
cell_data_date_added = partial(cell_data_date, key='cell_data_date_added')
cell_data_date_completed = partial(cell_data_date, key='cell_data_date_completed')
diff --git a/deluge/ui/tracker_icons.py b/deluge/ui/tracker_icons.py
index aab374f2a..e6694e73c 100644
--- a/deluge/ui/tracker_icons.py
+++ b/deluge/ui/tracker_icons.py
@@ -562,6 +562,7 @@ def icon_name_to_host(icon):
"""
return icon.rpartition('.')[0]
+
MIME_MAP = {
'image/gif': 'gif',
'image/jpeg': 'jpg',
diff --git a/deluge/ui/web/common.py b/deluge/ui/web/common.py
index ede22767d..ff3abd567 100644
--- a/deluge/ui/web/common.py
+++ b/deluge/ui/web/common.py
@@ -36,6 +36,7 @@ def compress(contents, request):
contents += compress_zlib.flush()
return contents
+
try:
# This is beeing done like this in order to allow tests to use the above
# `compress` without requiring Mako to be instaled