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

Method blank_copy

rich/text.py:430–441  ·  view source on GitHub ↗

Return a new Text instance with copied metadata (but not the string or spans).

(self, plain: str = "")

Source from the content-addressed store, hash-verified

428 self._spans = spans[:]
429
430 def blank_copy(self, plain: str = "") -> "Text":
431 """Return a new Text instance with copied metadata (but not the string or spans)."""
432 copy_self = Text(
433 plain,
434 style=self.style,
435 justify=self.justify,
436 overflow=self.overflow,
437 no_wrap=self.no_wrap,
438 end=self.end,
439 tab_size=self.tab_size,
440 )
441 return copy_self
442
443 def copy(self) -> "Text":
444 """Return a copy of this instance."""

Callers 2

joinMethod · 0.95
with_indent_guidesMethod · 0.80

Calls 1

TextClass · 0.85

Tested by

no test coverage detected