diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-05-14 21:29:35 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-05-14 21:29:35 (GMT) |
| commit | b8efcd30537f04269738e6969376129f4ed88315 (patch) | |
| tree | cf0f4f2d12603ca85bc5f0b664bcd4883b85f436 /wasp/apps/pager.py | |
| parent | f07fb6d22a7124f945a29c2895cec87a69e08b37 (diff) | |
wasp: Even more docstrings
Diffstat (limited to 'wasp/apps/pager.py')
| -rw-r--r-- | wasp/apps/pager.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/wasp/apps/pager.py b/wasp/apps/pager.py index 7da8f5a..18322d2 100644 --- a/wasp/apps/pager.py +++ b/wasp/apps/pager.py @@ -1,20 +1,22 @@ # SPDX-License-Identifier: LGPL-3.0-or-later # Copyright (C) 2020 Daniel Thompson +"""Pager applications +~~~~~~~~~~~~~~~~~~~~~ + +The pager is used to present text based information to the user. It is +primarily intended for notifications but is also used to provide debugging +information when applications crash. +""" + import wasp import icons import io import sys - class PagerApp(): - """Show long text in a pager. - - This is used to present text based information to the user. It is primarily - intended for notifications but is also used to provide debugging - information when applications crash. - """ + """Show a long text message in a pager.""" NAME = 'Pager' ICON = icons.app @@ -31,10 +33,12 @@ class PagerApp(): self._draw() def background(self): + """De-activate the application.""" del self._chunks del self._numpages def swipe(self, event): + """Swipe to page up/down.""" mute = wasp.watch.display.mute if event[0] == wasp.EventType.UP: @@ -114,6 +118,5 @@ class CrashApp(): wasp.watch.display.invert(True) def swipe(self, event): - """Show the exception message in a pager. - """ + """Show the exception message in a pager.""" wasp.system.switch(PagerApp(self._msg)) |
