summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2015-10-20 19:41:47 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2015-10-21 00:06:27 +0100
commit32bc20d8ce2b564a460cdc82ba0b9ebe8e05ed6b (patch)
tree2e8d7996f81ca4a900a36b1c3ccfe1f0884288f5 /deluge/ui/web
parent82ac1bdfe0553002ebe27e6f50d53f25594e00ff (diff)
downloaddeluge-32bc20d8ce2b564a460cdc82ba0b9ebe8e05ed6b.tar.gz
deluge-32bc20d8ce2b564a460cdc82ba0b9ebe8e05ed6b.tar.bz2
deluge-32bc20d8ce2b564a460cdc82ba0b9ebe8e05ed6b.zip
Fix pep8 across codebase
* Further whitespace fixes by autopep8 * Using pep8 v1.6.2 (not currently used by pyflakes) * Update config for pep8 and flake8 in tox.ini * A separate pep8 entry for running autopep8. The ignores prevent blank lines being added after docstrings. * .tox and E133 are ignored in flake8 by default.
Diffstat (limited to 'deluge/ui/web')
-rw-r--r--deluge/ui/web/auth.py5
-rw-r--r--deluge/ui/web/common.py4
-rw-r--r--deluge/ui/web/web.py6
3 files changed, 8 insertions, 7 deletions
diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py
index 94ba6decd..93cf91b8e 100644
--- a/deluge/ui/web/auth.py
+++ b/deluge/ui/web/auth.py
@@ -15,10 +15,9 @@ from datetime import datetime, timedelta
from email.utils import formatdate
from functools import reduce
-from twisted.internet.task import LoopingCall
-
from deluge import component
from deluge.common import utf8_encoded
+from twisted.internet.task import LoopingCall
log = logging.getLogger(__name__)
@@ -39,7 +38,7 @@ class AuthError(Exception):
pass
# Import after as json_api imports the above AuthError and AUTH_LEVEL_DEFAULT
-from deluge.ui.web.json_api import export, JSONComponent # isort:skip
+from deluge.ui.web.json_api import export, JSONComponent # NOQA, isort:skip
def make_checksum(session_id):
diff --git a/deluge/ui/web/common.py b/deluge/ui/web/common.py
index 0acd16d5b..1f5ca03d4 100644
--- a/deluge/ui/web/common.py
+++ b/deluge/ui/web/common.py
@@ -12,7 +12,9 @@ import zlib
from deluge import common
-_ = lambda x: gettext.gettext(x).decode("utf-8")
+
+def _(text):
+ gettext.gettext(text).decode("utf-8")
def escape(text):
diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py
index 070bb4955..4fa9c8524 100644
--- a/deluge/ui/web/web.py
+++ b/deluge/ui/web/web.py
@@ -36,9 +36,9 @@ class Web(_UI):
help="Set the base path that the ui is running on (proxying)",
action="store", default=None)
if not (deluge.common.windows_check() or deluge.common.osx_check()):
- group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize",
- help="Do not daemonize the web interface",
- action="store_true", default=False)
+ group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize",
+ help="Do not daemonize the web interface",
+ action="store_true", default=False)
group.add_option("-P", "--pidfile", dest="pidfile", type="str",
help="Use pidfile to store process id",
action="store", default=None)