summaryrefslogtreecommitdiff
path: root/alot/ui.py
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2017-01-19 09:47:42 +0100
committerLucas Hoffmann <l-m-h@web.de>2017-01-20 13:37:39 +0100
commit1af4c5e65483ef0907d91094e2dac1d546fc6f67 (patch)
treed5b561fc4fd4b057bf44ca137bad0bdd7fe7c3c6 /alot/ui.py
parentd2497661acdb9ec0c24d672b5226da6d16f2fec3 (diff)
Add docstrings to some methods and functions.
Diffstat (limited to 'alot/ui.py')
-rw-r--r--alot/ui.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/alot/ui.py b/alot/ui.py
index 9d9e365a..8b3ac790 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -137,8 +137,8 @@ class UI(object):
self._unlock_callback()
# otherwise interpret keybinding
else:
- # define callback that resets input queue
def clear(*_):
+ """Callback that resets the input queue."""
if self._alarm is not None:
self.mainloop.remove_alarm(self._alarm)
self.input_queue = []
@@ -290,8 +290,8 @@ class UI(object):
oldroot = self.mainloop.widget
def select_or_cancel(text):
- # restore main screen and invoke callback
- # (delayed return) with given text
+ """Restore the main screen and invoce the callback (delayed return)
+ with the given text."""
self.mainloop.widget = oldroot
self._passall = False
d.callback(text)
@@ -497,6 +497,8 @@ class UI(object):
oldroot = self.mainloop.widget
def select_or_cancel(text):
+ """Restore the main screen and invoce the callback (delayed return)
+ with the given text."""
self.mainloop.widget = oldroot
self._passall = False
d.callback(text)
@@ -650,8 +652,8 @@ class UI(object):
:type cmd: :class:`~alot.commands.Command`
"""
if cmd:
- # define (callback) function that invokes post-hook
def call_posthook(_):
+ """Callback function that will invoke the post-hook."""
if cmd.posthook:
logging.info('calling post-hook')
return defer.maybeDeferred(cmd.posthook,