Gets a progress bar widget for a task.
(self, task: "Task")
| 671 | super().__init__(table_column=table_column) |
| 672 | |
| 673 | def render(self, task: "Task") -> ProgressBar: |
| 674 | """Gets a progress bar widget for a task.""" |
| 675 | return ProgressBar( |
| 676 | total=max(0, task.total) if task.total is not None else None, |
| 677 | completed=max(0, task.completed), |
| 678 | width=None if self.bar_width is None else max(1, self.bar_width), |
| 679 | pulse=not task.started, |
| 680 | animation_time=task.get_time(), |
| 681 | style=self.style, |
| 682 | complete_style=self.complete_style, |
| 683 | finished_style=self.finished_style, |
| 684 | pulse_style=self.pulse_style, |
| 685 | ) |
| 686 | |
| 687 | |
| 688 | class TimeElapsedColumn(ProgressColumn): |
no test coverage detected