Path 1: 70 calls (0.51)

None (69) 'test table' (1)

None (69) 'table caption' (1)

None (70)

None (70)

None (53) Box (17)

None (70)

(0, 1) (61) (0, 1, 0, 0) (5) 1 (4)

True (49) False (21)

False (51) True (19)

False (66) True (4)

False (65) True (5)

False (70)

False (51) True (19)

False (70)

0 (70)

'none' (70)

None (69) ['none', 'dim'] (1)

'table.header' (70)

'table.footer' (70)

None (70)

None (70)

None (70)

'center' (70)

'center' (70)

False (70)

() (70)

1def __init__(
2        self,
3        *headers: Union[Column, str],
4        title: Optional[TextType] = None,
5        caption: Optional[TextType] = None,
6        width: Optional[int] = None,
7        min_width: Optional[int] = None,
8        box: Optional[box.Box] = box.HEAVY_HEAD,
9        safe_box: Optional[bool] = None,
10        padding: PaddingDimensions = (0, 1),
11        collapse_padding: bool = False,
12        pad_edge: bool = True,
13        expand: bool = False,
14        show_header: bool = True,
15        show_footer: bool = False,
16        show_edge: bool = True,
17        show_lines: bool = False,
18        leading: int = 0,
19        style: StyleType = "none",
20        row_styles: Optional[Iterable[StyleType]] = None,
21        header_style: Optional[StyleType] = "table.header",
22        footer_style: Optional[StyleType] = "table.footer",
23        border_style: Optional[StyleType] = None,
24        title_style: Optional[StyleType] = None,
25        caption_style: Optional[StyleType] = None,
26        title_justify: "JustifyMethod" = "center",
27        caption_justify: "JustifyMethod" = "center",
28        highlight: bool = False,
29    ) -> None:
30
31        self.columns: List[Column] = []
32        self.rows: List[Row] = []
33        self.title = title
34        self.caption = caption
35        self.width = width
36        self.min_width = min_width
37        self.box = box
38        self.safe_box = safe_box
39        self._padding = Padding.unpack(padding)
40        self.pad_edge = pad_edge
41        self._expand = expand
42        self.show_header = show_header
43        self.show_footer = show_footer
44        self.show_edge = show_edge
45        self.show_lines = show_lines
46        self.leading = leading
47        self.collapse_padding = collapse_padding
48        self.style = style
49        self.header_style = header_style or ""
50        self.footer_style = footer_style or ""
51        self.border_style = border_style
52        self.title_style = title_style
53        self.caption_style = caption_style
54        self.title_justify: "JustifyMethod" = title_justify
55        self.caption_justify: "JustifyMethod" = caption_justify
56        self.highlight = highlight
57        self.row_styles: Sequence[StyleType] = list(row_styles or [])
58        append_column = self.columns.append
59        for header in headers:
60            if isinstance(header, str):
61                self.add_column(header=header)
62            else:
63                header._index = len(self.columns)
64                append_column(header)
            

Path 2: 60 calls (0.44)

None (60)

None (60)

None (60)

None (60)

None (59) Box (1)

None (60)

(0, 1) (60)

True (59) False (1)

False (59) True (1)

False (60)

False (59) True (1)

False (60)

False (59) True (1)

False (60)

0 (60)

'none' (60)

None (60)

'table.header' (60)

'table.footer' (60)

None (60)

None (60)

None (60)

'center' (60)

'center' (60)

False (60)

tuple (60)

1def __init__(
2        self,
3        *headers: Union[Column, str],
4        title: Optional[TextType] = None,
5        caption: Optional[TextType] = None,
6        width: Optional[int] = None,
7        min_width: Optional[int] = None,
8        box: Optional[box.Box] = box.HEAVY_HEAD,
9        safe_box: Optional[bool] = None,
10        padding: PaddingDimensions = (0, 1),
11        collapse_padding: bool = False,
12        pad_edge: bool = True,
13        expand: bool = False,
14        show_header: bool = True,
15        show_footer: bool = False,
16        show_edge: bool = True,
17        show_lines: bool = False,
18        leading: int = 0,
19        style: StyleType = "none",
20        row_styles: Optional[Iterable[StyleType]] = None,
21        header_style: Optional[StyleType] = "table.header",
22        footer_style: Optional[StyleType] = "table.footer",
23        border_style: Optional[StyleType] = None,
24        title_style: Optional[StyleType] = None,
25        caption_style: Optional[StyleType] = None,
26        title_justify: "JustifyMethod" = "center",
27        caption_justify: "JustifyMethod" = "center",
28        highlight: bool = False,
29    ) -> None:
30
31        self.columns: List[Column] = []
32        self.rows: List[Row] = []
33        self.title = title
34        self.caption = caption
35        self.width = width
36        self.min_width = min_width
37        self.box = box
38        self.safe_box = safe_box
39        self._padding = Padding.unpack(padding)
40        self.pad_edge = pad_edge
41        self._expand = expand
42        self.show_header = show_header
43        self.show_footer = show_footer
44        self.show_edge = show_edge
45        self.show_lines = show_lines
46        self.leading = leading
47        self.collapse_padding = collapse_padding
48        self.style = style
49        self.header_style = header_style or ""
50        self.footer_style = footer_style or ""
51        self.border_style = border_style
52        self.title_style = title_style
53        self.caption_style = caption_style
54        self.title_justify: "JustifyMethod" = title_justify
55        self.caption_justify: "JustifyMethod" = caption_justify
56        self.highlight = highlight
57        self.row_styles: Sequence[StyleType] = list(row_styles or [])
58        append_column = self.columns.append
59        for header in headers:
60            if isinstance(header, str):
61                self.add_column(header=header)
62            else:
63                header._index = len(self.columns)
64                append_column(header)
            

Path 3: 6 calls (0.04)

None (5) 'Palette' (1)

None (5) '16 colors' (1)

None (5) -1 (1)

None (5) 30 (1)

Box (6)

None (6)

(0, 1) (6)

False (6)

True (6)

False (6)

True (6)

False (6)

True (6)

False (6)

0 (6)

'none' (6)

None (6)

'table.header' (6)

'table.footer' (6)

None (6)

None (6)

None (6)

'center' (6)

'center' (5) 'right' (1)

False (5) True (1)

('test_header',) (2) ('foo',) (2) ('index', 'RGB', 'Color') (1) ('header1', 'header2', 'header3') (1)

1def __init__(
2        self,
3        *headers: Union[Column, str],
4        title: Optional[TextType] = None,
5        caption: Optional[TextType] = None,
6        width: Optional[int] = None,
7        min_width: Optional[int] = None,
8        box: Optional[box.Box] = box.HEAVY_HEAD,
9        safe_box: Optional[bool] = None,
10        padding: PaddingDimensions = (0, 1),
11        collapse_padding: bool = False,
12        pad_edge: bool = True,
13        expand: bool = False,
14        show_header: bool = True,
15        show_footer: bool = False,
16        show_edge: bool = True,
17        show_lines: bool = False,
18        leading: int = 0,
19        style: StyleType = "none",
20        row_styles: Optional[Iterable[StyleType]] = None,
21        header_style: Optional[StyleType] = "table.header",
22        footer_style: Optional[StyleType] = "table.footer",
23        border_style: Optional[StyleType] = None,
24        title_style: Optional[StyleType] = None,
25        caption_style: Optional[StyleType] = None,
26        title_justify: "JustifyMethod" = "center",
27        caption_justify: "JustifyMethod" = "center",
28        highlight: bool = False,
29    ) -> None:
30
31        self.columns: List[Column] = []
32        self.rows: List[Row] = []
33        self.title = title
34        self.caption = caption
35        self.width = width
36        self.min_width = min_width
37        self.box = box
38        self.safe_box = safe_box
39        self._padding = Padding.unpack(padding)
40        self.pad_edge = pad_edge
41        self._expand = expand
42        self.show_header = show_header
43        self.show_footer = show_footer
44        self.show_edge = show_edge
45        self.show_lines = show_lines
46        self.leading = leading
47        self.collapse_padding = collapse_padding
48        self.style = style
49        self.header_style = header_style or ""
50        self.footer_style = footer_style or ""
51        self.border_style = border_style
52        self.title_style = title_style
53        self.caption_style = caption_style
54        self.title_justify: "JustifyMethod" = title_justify
55        self.caption_justify: "JustifyMethod" = caption_justify
56        self.highlight = highlight
57        self.row_styles: Sequence[StyleType] = list(row_styles or [])
58        append_column = self.columns.append
59        for header in headers:
60            if isinstance(header, str):
61                self.add_column(header=header)
62            else:
63                header._index = len(self.columns)
64                append_column(header)