diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-01-19 09:47:42 +0100 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-01-20 13:37:39 +0100 |
commit | 1af4c5e65483ef0907d91094e2dac1d546fc6f67 (patch) | |
tree | d5b561fc4fd4b057bf44ca137bad0bdd7fe7c3c6 /alot/ui.py | |
parent | d2497661acdb9ec0c24d672b5226da6d16f2fec3 (diff) |
Add docstrings to some methods and functions.
Diffstat (limited to 'alot/ui.py')
-rw-r--r-- | alot/ui.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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, |