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

Method set_live

rich/console.py:822–836  ·  view source on GitHub ↗

Set Live instance. Used by Live context manager (no need to call directly). Args: live (Live): Live instance using this Console. Returns: Boolean that indicates if the live is the topmost of the stack. Raises: errors.LiveError: If this C

(self, live: "Live")

Source from the content-addressed store, hash-verified

820 self._check_buffer()
821
822 def set_live(self, live: "Live") -> bool:
823 """Set Live instance. Used by Live context manager (no need to call directly).
824
825 Args:
826 live (Live): Live instance using this Console.
827
828 Returns:
829 Boolean that indicates if the live is the topmost of the stack.
830
831 Raises:
832 errors.LiveError: If this Console has a Live context currently active.
833 """
834 with self._lock:
835 self._live_stack.append(live)
836 return len(self._live_stack) == 1
837
838 def clear_live(self) -> None:
839 """Clear the Live instance. Used by the Live context manager (no need to call directly)."""

Callers 1

startMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected