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

Function pop_style

rich/markup.py:146–151  ·  view source on GitHub ↗

Pop tag matching given style name.

(style_name: str)

Source from the content-addressed store, hash-verified

144 _Tag = Tag
145
146 def pop_style(style_name: str) -> Tuple[int, Tag]:
147 """Pop tag matching given style name."""
148 for index, (_, tag) in enumerate(reversed(style_stack), 1):
149 if tag.name == style_name:
150 return pop(-index)
151 raise KeyError(style_name)
152
153 for position, plain_text, tag in _parse(markup):
154 if plain_text is not None:

Callers 1

renderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected