home
·
contact
·
privacy
projects
/
plomtask
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enhance BaseModel comparisons by hashing versioned and relations attributes.
[plomtask]
/
plomtask
/
todos.py
diff --git
a/plomtask/todos.py
b/plomtask/todos.py
index af45f720ca6e2011fb52bd5af18582a2feca76f1..fa009b12b8fb64e42b8a42f728fd0d4fb1740367 100644
(file)
--- 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
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']
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:
"""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
for child in node.children:
local_effort += walk_tree(child)
return node.performed_effort + local_effort