Method: rich.text.Text.__init__
Calls: 16097, Exceptions: 0, Paths: 1Back
Path 1: 16097 calls (1.0)
'\n' (5000) '' (3352) 'foo' (331) 'bar' (168) 'Step 0' (154) ' ' (150) ' try:' (144) 'Step 1' (140) 'Step 2' (126) 'Step 3' (112)
'' (9078) Style (5883) 'pretty' (376) 'none' (95) 'pygments.text' (89) 'progress.remaining' (73) 'inspect.help' (70) 'table.title' (66) 'table.caption...
None (9715) 'default' (5574) 'left' (661) 'full' (67) 'center' (60) 'right' (20)
None (15794) 'ellipsis' (163) 'ignore' (92) 'crop' (43) 'fold' (5)
None (15698) False (250) True (149)
'\n' (15871) '' (209) 'X' (15) ' ' (2)
8 (16046) 4 (51)
None (16083) list (14)
1def __init__(
2 self,
3 text: str = "",
4 style: Union[str, Style] = "",
5 *,
6 justify: Optional["JustifyMethod"] = None,
7 overflow: Optional["OverflowMethod"] = None,
8 no_wrap: Optional[bool] = None,
9 end: str = "\n",
10 tab_size: Optional[int] = 8,
11 spans: Optional[List[Span]] = None,
12 ) -> None:
13 sanitized_text = strip_control_codes(text)
14 self._text = [sanitized_text]
15 self.style = style
16 self.justify: Optional["JustifyMethod"] = justify
17 self.overflow: Optional["OverflowMethod"] = overflow
18 self.no_wrap = no_wrap
19 self.end = end
20 self.tab_size = tab_size
21 self._spans: List[Span] = spans or []
22 self._length: int = len(sanitized_text)