summaryrefslogtreecommitdiff
path: root/alot/ui.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-12-20 12:12:07 -0800
committerDylan Baker <dylan@pnwbakers.com>2016-12-21 17:18:39 -0800
commit41ef1f14636caf213e7c25dc3eeb3d911418ee72 (patch)
tree75d34e6edaecaf3ad66fb544e0cd7a996fd4ad4d /alot/ui.py
parentbf2005c111289fcd7f55b92e64cfa8c43b9bfdbc (diff)
Replace unused arguments with _
This patch replaces a large number (but not all) unused arguments with the standard ``_`` placeholder. This has the advantage of signaling that these values are unused. There are a number of places that I've chosen not to apply this, largely in methods that have publicly define signatures that they inherit (usually from urwid).
Diffstat (limited to 'alot/ui.py')
-rw-r--r--alot/ui.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/alot/ui.py b/alot/ui.py
index c093fd1e..954f4557 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -138,12 +138,12 @@ class UI(object):
# otherwise interpret keybinding
else:
# define callback that resets input queue
- def clear(*args):
+ def clear(*_):
if self._alarm is not None:
self.mainloop.remove_alarm(self._alarm)
self.input_queue = []
- def fire(ignored, cmdline):
+ def fire(_, cmdline):
clear()
logging.debug("cmdline: '%s'", cmdline)
if not self._locked:
@@ -210,7 +210,7 @@ class UI(object):
# one callback may return a Deferred and thus postpone the application
# of the next callback (and thus Command-application)
- def apply_this_command(ignored, cmdstring):
+ def apply_this_command(_, cmdstring):
logging.debug('%s command string: "%s"', self.mode, str(cmdstring))
# translate cmdstring into :class:`Command`
cmd = commandfactory(cmdstring, self.mode)
@@ -308,7 +308,7 @@ class UI(object):
edit_text=text, history=history,
on_error=cerror)
- for i in range(tab): # hit some tabs
+ for _ in range(tab): # hit some tabs
editpart.keypress((0,), 'tab')
# build promptwidget
@@ -559,7 +559,7 @@ class UI(object):
self._notificationbar = urwid.Pile(newpile)
self.update()
- def clear(*args):
+ def clear(*_):
self.clear_notify(msgs)
if block:
@@ -649,7 +649,7 @@ class UI(object):
"""
if cmd:
# define (callback) function that invokes post-hook
- def call_posthook(retval_from_apply):
+ def call_posthook(_):
if cmd.posthook:
logging.info('calling post-hook')
return defer.maybeDeferred(cmd.posthook,
@@ -658,7 +658,7 @@ class UI(object):
cmd=cmd)
# call cmd.apply
- def call_apply(ignored):
+ def call_apply(_):
return defer.maybeDeferred(cmd.apply, self)
prehook = cmd.prehook or (lambda **kwargs: None)