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

Method render_bullet

rich/markdown.py:384–395  ·  view source on GitHub ↗
(self, console: Console, options: ConsoleOptions)

Source from the content-addressed store, hash-verified

382 return False
383
384 def render_bullet(self, console: Console, options: ConsoleOptions) -> RenderResult:
385 render_options = options.update(width=options.max_width - 3)
386 lines = console.render_lines(self.elements, render_options, style=self.style)
387 bullet_style = console.get_style("markdown.item.bullet", default="none")
388
389 bullet = Segment(" • ", bullet_style)
390 padding = Segment(" " * 3, bullet_style)
391 new_line = Segment("\n")
392 for first, line in loop_first(lines):
393 yield bullet if first else padding
394 yield from line
395 yield new_line
396
397 def render_number(
398 self, console: Console, options: ConsoleOptions, number: int, last_number: int

Callers 1

__rich_console__Method · 0.80

Calls 5

SegmentClass · 0.85
loop_firstFunction · 0.85
render_linesMethod · 0.80
get_styleMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected