Method: rich.control.Control.__init__
Calls: 308, Exceptions: 0, Paths: 1Back
Path 1: 308 calls (1.0)
tuple (185) () (123)
1def __init__(self, *codes: Union[ControlType, ControlCode]) -> None:
2 control_codes: List[ControlCode] = [
3 (code,) if isinstance(code, ControlType) else code for code in codes
4 ]
5 _format_map = CONTROL_CODES_FORMAT
6 rendered_codes = "".join(
7 _format_map[code](*parameters) for code, *parameters in control_codes
8 )
9 self.segment = Segment(rendered_codes, None, control_codes)