X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomtask%2Ftodos.py;fp=plomtask%2Ftodos.py;h=ffef677d29e652ad82d18e2d2c9f7b848e73a698;hb=5383b5cf1520a1cb66b4966dd4ee449a99f5e465;hp=712609aa8d81fdbe4f194a244ab6927224ee67ca;hpb=f8b17d94a1867e7cc01782c9301ccb718de0f9c2;p=plomtask diff --git a/plomtask/todos.py b/plomtask/todos.py index 712609a..ffef677 100644 --- a/plomtask/todos.py +++ b/plomtask/todos.py @@ -182,6 +182,20 @@ class Todo(BaseModel[int], ConditionsRelations): """Shortcut to .process.title.""" return self.process.title + @property + def title_then(self) -> str: + """Shortcut to .process.title.at(self.date)""" + title_then = self.process.title.at(self.date) + assert isinstance(title_then, str) + return title_then + + @property + def effort_then(self) -> float: + """Shortcut to .process.effort.at(self.date)""" + effort_then = self.process.effort.at(self.date) + assert isinstance(effort_then, float) + return effort_then + def adopt_from(self, todos: list[Todo]) -> bool: """As far as possible, fill unsatisfied dependencies from todos.""" adopted = False