Path 1: 21 calls (0.58)

Console (21)

tuple (21)

1def _get_number_styles(self, console: Console) -> Tuple[Style, Style, Style]:
2        """Get background, number, and highlight styles for line numbers."""
3        background_style = self._get_base_style()
4        if background_style.transparent_background:
5            return Style.null(), Style(dim=True), Style.null()
6        if console.color_system in ("256", "truecolor"):
7            number_style = Style.chain(
8                background_style,
9                self._theme.get_style_for_token(Token.Text),
10                Style(color=self._get_line_numbers_color()),
11                self.background_style,
12            )
13            highlight_number_style = Style.chain(
14                background_style,
15                self._theme.get_style_for_token(Token.Text),
16                Style(bold=True, color=self._get_line_numbers_color(0.9)),
17                self.background_style,
18            )
19        else:
20            number_style = background_style + Style(dim=True)
21            highlight_number_style = background_style + Style(dim=False)
22        return background_style, number_style, highlight_number_style
            

Path 2: 14 calls (0.39)

Console (14)

tuple (14)

1def _get_number_styles(self, console: Console) -> Tuple[Style, Style, Style]:
2        """Get background, number, and highlight styles for line numbers."""
3        background_style = self._get_base_style()
4        if background_style.transparent_background:
5            return Style.null(), Style(dim=True), Style.null()
6        if console.color_system in ("256", "truecolor"):
7            number_style = Style.chain(
8                background_style,
9                self._theme.get_style_for_token(Token.Text),
10                Style(color=self._get_line_numbers_color()),
11                self.background_style,
12            )
13            highlight_number_style = Style.chain(
14                background_style,
15                self._theme.get_style_for_token(Token.Text),
16                Style(bold=True, color=self._get_line_numbers_color(0.9)),
17                self.background_style,
18            )
19        else:
20            number_style = background_style + Style(dim=True)
21            highlight_number_style = background_style + Style(dim=False)
22        return background_style, number_style, highlight_number_style
            

Path 3: 1 calls (0.03)

Console (1)

tuple (1)

1def _get_number_styles(self, console: Console) -> Tuple[Style, Style, Style]:
2        """Get background, number, and highlight styles for line numbers."""
3        background_style = self._get_base_style()
4        if background_style.transparent_background:
5            return Style.null(), Style(dim=True), Style.null()
6        if console.color_system in ("256", "truecolor"):
7            number_style = Style.chain(
8                background_style,
9                self._theme.get_style_for_token(Token.Text),
10                Style(color=self._get_line_numbers_color()),
11                self.background_style,
12            )
13            highlight_number_style = Style.chain(
14                background_style,
15                self._theme.get_style_for_token(Token.Text),
16                Style(bold=True, color=self._get_line_numbers_color(0.9)),
17                self.background_style,
18            )
19        else:
20            number_style = background_style + Style(dim=True)
21            highlight_number_style = background_style + Style(dim=False)
22        return background_style, number_style, highlight_number_style