X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomtask%2Ftodos.py;fp=plomtask%2Ftodos.py;h=f5388b58f25ec1237b65b751c8fd5fa352160ddf;hb=692bfbac8d81ad5f1f0210e550dcabd15c58e8a5;hp=4d7e393bc49191db242235c1f11092bafce450ed;hpb=501b2ef5f6373807b7728e7b8539105aa9030809;p=plomtask diff --git a/plomtask/todos.py b/plomtask/todos.py index 4d7e393..f5388b5 100644 --- a/plomtask/todos.py +++ b/plomtask/todos.py @@ -51,6 +51,10 @@ class Todo(BaseModel[int], ConditionsRelations): days_to_update: Set[str] = set() children: list[Todo] parents: list[Todo] + sorters = {'doneness': lambda t: t.is_done, + 'title': lambda t: t.title_then, + 'comment': lambda t: t.comment, + 'date': lambda t: t.date} # pylint: disable=too-many-arguments def __init__(self, id_: int | None,