Path 1: 256 calls (0.44)

Console (256)

ConsoleOptions (256)

Segment (4365)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 2: 159 calls (0.27)

Console (159)

ConsoleOptions (159)

Segment (1802)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 3: 94 calls (0.16)

Console (94)

ConsoleOptions (94)

Segment (582)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 4: 37 calls (0.06)

Console (37)

ConsoleOptions (37)

Segment (227) None (37)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 5: 8 calls (0.01)

Console (8)

ConsoleOptions (8)

Segment (64)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 6: 8 calls (0.01)

Console (8)

ConsoleOptions (8)

Segment (913)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 7: 7 calls (0.01)

Console (7)

ConsoleOptions (7)

Segment (133) None (7)

GeneratorExit (7)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 8: 4 calls (0.01)

Console (4)

ConsoleOptions (4)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 9: 3 calls (0.01)

Console (3)

ConsoleOptions (3)

Segment (406)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 10: 1 calls (0.0)

Console (1)

ConsoleOptions (1)

Segment (5) None (1)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 11: 1 calls (0.0)

Console (1)

ConsoleOptions (1)

Segment (1) None (1)

GeneratorExit (1)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 12: 1 calls (0.0)

Console (1)

ConsoleOptions (1)

Segment (6) None (1)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom
            

Path 13: 1 calls (0.0)

Console (1)

ConsoleOptions (1)

Segment (29)

1def __rich_console__(
2        self, console: "Console", options: "ConsoleOptions"
3    ) -> "RenderResult":
4        style = console.get_style(self.style)
5        if self.expand:
6            width = options.max_width
7        else:
8            width = min(
9                Measurement.get(console, options, self.renderable).maximum
10                + self.left
11                + self.right,
12                options.max_width,
13            )
14        render_options = options.update_width(width - self.left - self.right)
15        if render_options.height is not None:
16            render_options = render_options.update_height(
17                height=render_options.height - self.top - self.bottom
18            )
19        lines = console.render_lines(
20            self.renderable, render_options, style=style, pad=True
21        )
22        _Segment = Segment
23
24        left = _Segment(" " * self.left, style) if self.left else None
25        right = (
26            [_Segment(f'{" " * self.right}', style), _Segment.line()]
27            if self.right
28            else [_Segment.line()]
29        )
30        blank_line: Optional[List[Segment]] = None
31        if self.top:
32            blank_line = [_Segment(f'{" " * width}\n', style)]
33            yield from blank_line * self.top
34        if left:
35            for line in lines:
36                yield left
37                yield from line
38                yield from right
39        else:
40            for line in lines:
41                yield from line
42                yield from right
43        if self.bottom:
44            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
45            yield from blank_line * self.bottom