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

Method enter_style

rich/markdown.py:501–505  ·  view source on GitHub ↗

Enter a style context.

(self, style_name: str | Style)

Source from the content-addressed store, hash-verified

499 self.stack.top.on_text(self, text)
500
501 def enter_style(self, style_name: str | Style) -> Style:
502 """Enter a style context."""
503 style = self.console.get_style(style_name, default="none")
504 self.style_stack.push(style)
505 return self.current_style
506
507 def leave_style(self) -> Style:
508 """Leave a style context."""

Callers 3

__rich_console__Method · 0.95
on_enterMethod · 0.80
on_enterMethod · 0.80

Calls 2

get_styleMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected