Path 1: 32 calls (0.54)

list (32)

Table (32)

1def make_tasks_table(self, tasks: Iterable[Task]) -> Table:
2        """Get a table to render the Progress display.
3
4        Args:
5            tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.
6
7        Returns:
8            Table: A table instance.
9        """
10        table_columns = (
11            (
12                Column(no_wrap=True)
13                if isinstance(_column, str)
14                else _column.get_table_column().copy()
15            )
16            for _column in self.columns
17        )
18        table = Table.grid(*table_columns, padding=(0, 1), expand=self.expand)
19
20        for task in tasks:
21            if task.visible:
22                table.add_row(
23                    *(
24                        (
25                            column.format(task=task)
26                            if isinstance(column, str)
27                            else column(task)
28                        )
29                        for column in self.columns
30                    )
31                )
32        return table
            

Path 2: 27 calls (0.46)

[] (27)

Table (27)

1def make_tasks_table(self, tasks: Iterable[Task]) -> Table:
2        """Get a table to render the Progress display.
3
4        Args:
5            tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.
6
7        Returns:
8            Table: A table instance.
9        """
10        table_columns = (
11            (
12                Column(no_wrap=True)
13                if isinstance(_column, str)
14                else _column.get_table_column().copy()
15            )
16            for _column in self.columns
17        )
18        table = Table.grid(*table_columns, padding=(0, 1), expand=self.expand)
19
20        for task in tasks:
21            if task.visible:
22                table.add_row(
23                    *(
24                        (
25                            column.format(task=task)
26                            if isinstance(column, str)
27                            else column(task)
28                        )
29                        for column in self.columns
30                    )
31                )
32        return table