Open
Description
Hi,
I use another version of ptpython and have noticed that the result of PythonRepl
does not take care of the color_depth
.
def print_formatted_text(
self, formatted_text: StyleAndTextTuples, end: str = "\n"
) -> None:
print_formatted_text(
FormattedText(formatted_text),
style=self._current_style,
style_transformation=self.style_transformation,
include_default_pygments_style=False,
output=self.app.output,
end=end,
)
Looking at your main code code, now not it use a OutputPrinter
but the result is the same.
Is there a reason not to use color_depth
for printing the result (while the min/max intensity are propagated through self.style_transformation
)?
It's particularly weird when the color_depth = 1bit
.
The fix was easy, but have to be done in a different way in your main branch.
def print_formatted_text(
self, formatted_text: StyleAndTextTuples, end: str = "\n"
) -> None:
print_formatted_text(
FormattedText(formatted_text),
style=self._current_style,
style_transformation=self.style_transformation,
+ color_depth=self.color_depth,
include_default_pygments_style=False,
output=self.app.output,
end=end,
)
What do you think?
Metadata
Metadata
Assignees
Labels
No labels