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

Method use_theme

rich/console.py:896–906  ·  view source on GitHub ↗

Use a different theme for the duration of the context manager. Args: theme (Theme): Theme instance to user. inherit (bool, optional): Inherit existing console styles. Defaults to True. Returns: ThemeContext: [description]

(self, theme: Theme, *, inherit: bool = True)

Source from the content-addressed store, hash-verified

894 self._theme_stack.pop_theme()
895
896 def use_theme(self, theme: Theme, *, inherit: bool = True) -> ThemeContext:
897 """Use a different theme for the duration of the context manager.
898
899 Args:
900 theme (Theme): Theme instance to user.
901 inherit (bool, optional): Inherit existing console styles. Defaults to True.
902
903 Returns:
904 ThemeContext: [description]
905 """
906 return ThemeContext(self, theme, inherit)
907
908 @property
909 def color_system(self) -> Optional[str]:

Callers 1

render_stackMethod · 0.80

Calls 1

ThemeContextClass · 0.85

Tested by

no test coverage detected