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

Method push

rich/style.py:781–787  ·  view source on GitHub ↗

Push a new style on to the stack. Args: style (Style): New style to combine with current style.

(self, style: Style)

Source from the content-addressed store, hash-verified

779 return self._stack[-1]
780
781 def push(self, style: Style) -> None:
782 """Push a new style on to the stack.
783
784 Args:
785 style (Style): New style to combine with current style.
786 """
787 self._stack.append(self._stack[-1] + style)
788
789 def pop(self) -> Style:
790 """Pop last style and discard.

Callers 2

test_style_stackFunction · 0.95
__rich_console__Method · 0.95

Calls 1

appendMethod · 0.45

Tested by 1

test_style_stackFunction · 0.76