Method: rich.text.Text.pad_right
Calls: 148, Exceptions: 0, Paths: 2Back
Path 1: 129 calls (0.87)
3 (20) 6 (13) 2 (12) 8 (11) 45 (10) 4 (8) 5 (7) 29 (6) 1 (4) 18 (4)
' ' (128) 'X' (1)
1def pad_right(self, count: int, character: str = " ") -> None:
2 """Pad the right with a given character.
3
4 Args:
5 count (int): Number of characters to pad.
6 character (str, optional): Character to pad with. Defaults to " ".
7 """
8 assert len(character) == 1, "Character must be a string of length 1"
9 if count:
10 self.plain = f"{self.plain}{character * count}"
Path 2: 19 calls (0.13)
0 (19)
' ' (19)
1def pad_right(self, count: int, character: str = " ") -> None:
2 """Pad the right with a given character.
3
4 Args:
5 count (int): Number of characters to pad.
6 character (str, optional): Character to pad with. Defaults to " ".
7 """
8 assert len(character) == 1, "Character must be a string of length 1"
9 if count:
10 self.plain = f"{self.plain}{character * count}"