MCPcopy
hub / github.com/Textualize/rich / _rule_line

Method _rule_line

rich/rule.py:105–109  ·  view source on GitHub ↗
(self, chars_len: int, width: int)

Source from the content-addressed store, hash-verified

103 yield rule_text
104
105 def _rule_line(self, chars_len: int, width: int) -> Text:
106 rule_text = Text(self.characters * ((width // chars_len) + 1), self.style)
107 rule_text.truncate(width)
108 rule_text.plain = set_cell_size(rule_text.plain, width)
109 return rule_text
110
111 def __rich_measure__(
112 self, console: Console, options: ConsoleOptions

Callers 1

__rich_console__Method · 0.95

Calls 3

truncateMethod · 0.95
TextClass · 0.85
set_cell_sizeFunction · 0.85

Tested by

no test coverage detected