class Todo(BaseModel[int], ConditionsRelations):
"""Individual actionable."""
# pylint: disable=too-many-instance-attributes
+ # pylint: disable=too-many-public-methods
table_name = 'todos'
to_save = ['process_id', 'is_done', 'date', 'comment', 'effort',
'calendarize']
"""Return sum of performed efforts of self and all descendants."""
def walk_tree(node: Todo) -> float:
- local_effort = 0
+ local_effort = 0.0
for child in node.children:
local_effort += walk_tree(child)
return node.performed_effort + local_effort