(self)
| 148 | await self.task_delete(task) |
| 149 | |
| 150 | async def update(self): |
| 151 | status = self.filter.tabs[self.filter.selected_index].text |
| 152 | count = 0 |
| 153 | for task in self.tasks.controls: |
| 154 | task.visible = ( |
| 155 | status == "all" |
| 156 | or (status == "active" and not task.completed) |
| 157 | or (status == "completed" and task.completed) |
| 158 | ) |
| 159 | if not task.completed: |
| 160 | count += 1 |
| 161 | self.items_left.value = f"{count} active item(s) left" |
| 162 | await super().update() |
| 163 | |
| 164 | |
| 165 | async def main(page: ft.Page): |
no outgoing calls
no test coverage detected