MCPcopy Index your code
hub / github.com/prompt-toolkit/ptpython / _generate_style

Method _generate_style

src/ptpython/python_input.py:545–554  ·  view source on GitHub ↗

Create new Style instance. (We don't want to do this on every key press, because each time the renderer receives a new style class, he will redraw everything.)

(self)

Source from the content-addressed store, hash-verified

543 self.min_brightness = min(self.min_brightness, value)
544
545 def _generate_style(self) -> BaseStyle:
546 """
547 Create new Style instance.
548 (We don't want to do this on every key press, because each time the
549 renderer receives a new style class, he will redraw everything.)
550 """
551 return generate_style(
552 self.code_styles[self._current_code_style_name],
553 self.ui_styles[self._current_ui_style_name],
554 )
555
556 def _create_options(self) -> list[OptionCategory[Any]]:
557 """

Callers 3

__init__Method · 0.95
use_code_colorschemeMethod · 0.95
use_ui_colorschemeMethod · 0.95

Calls 1

generate_styleFunction · 0.85

Tested by

no test coverage detected