X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomtask%2Ftodos.py;h=fa009b12b8fb64e42b8a42f728fd0d4fb1740367;hb=344d6c234e50953b36ac9fed2cfce8d4ba64a5b3;hp=af45f720ca6e2011fb52bd5af18582a2feca76f1;hpb=f0f10048714c1bbcf23a7fa6a934d126408845f3;p=plomtask diff --git a/plomtask/todos.py b/plomtask/todos.py index af45f72..fa009b1 100644 --- a/plomtask/todos.py +++ b/plomtask/todos.py @@ -23,6 +23,7 @@ class TodoNode: 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'] @@ -258,7 +259,7 @@ class Todo(BaseModel[int], ConditionsRelations): """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