summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattori Birnbaum <mattori.birnbaum@gmail.com>2021-05-08 20:57:00 +0900
committerChristian Geier <geier@lostpackets.de>2023-10-28 16:40:56 +0200
commit323c849f5749300177047d5c82df876b2e272e98 (patch)
tree5096ca73671ac83e89e169a4eae25c2f9c085673
parent5e889211c2adc9226e000f093e7324bb7e749b14 (diff)
update method docs
-rw-r--r--khal/controllers.py5
-rw-r--r--khal/utils.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/khal/controllers.py b/khal/controllers.py
index 7585ff99..e4a36148 100644
--- a/khal/controllers.py
+++ b/khal/controllers.py
@@ -187,12 +187,13 @@ def get_events_between(
:param locale:
:param start: the start datetime
:param end: the end datetime
- :param formatter: a function that is used for formatting the event
+ :param formatter: the formatter (see :class:`.utils.human_formatter`)
:param nostarted: True if each event should start after start (instead of
be active between start and end)
:param env: a collection of "static" values like calendar names and color
- :param seen:
:param original_start: start datetime to compare against of notstarted is set
+ :param seen:
+ :param colors:
:returns: a list to be printed as the agenda for the given days
"""
assert not (notstarted and not original_start)
diff --git a/khal/utils.py b/khal/utils.py
index 4925e924..05875dd6 100644
--- a/khal/utils.py
+++ b/khal/utils.py
@@ -185,6 +185,7 @@ def get_wrapped_text(widget: urwid.AttrMap) -> str:
def human_formatter(format_string, width=None, colors=True):
+ """Create a formatter that formats events to be human readable."""
def fmt(rows):
single = type(rows) == dict
if single:
@@ -206,6 +207,7 @@ def human_formatter(format_string, width=None, colors=True):
def json_formatter(fields):
+ """Create a formatter that formats events in JSON."""
def fmt(rows):
single = type(rows) == dict
if single: