(self)
| 31 | status: str = "all" |
| 32 | |
| 33 | def get_tasks(self) -> list[TaskItem]: |
| 34 | return list( |
| 35 | filter( |
| 36 | lambda task: self.status == "all" |
| 37 | or self.status == "active" |
| 38 | and not task.completed |
| 39 | or self.status == "completed" |
| 40 | and task.completed, |
| 41 | self.tasks, |
| 42 | ) |
| 43 | ) |
| 44 | |
| 45 | @property |
| 46 | def active_tasks_number(self) -> int: |