From 721641872b9b09446f15ee3b586a6b427f85f716 Mon Sep 17 00:00:00 2001 From: Brian Kohan Date: Sat, 17 Aug 2024 23:45:36 -0700 Subject: [PATCH] disable color for text targets --- sphinxcontrib/typer/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sphinxcontrib/typer/__init__.py b/sphinxcontrib/typer/__init__.py index 2d0bf1e..1a0b053 100644 --- a/sphinxcontrib/typer/__init__.py +++ b/sphinxcontrib/typer/__init__.py @@ -476,7 +476,9 @@ def get_console(stderr: bool = False) -> Console: }, ), "highlighter": typer_rich_utils.highlighter, - "color_system": typer_rich_utils.COLOR_SYSTEM, + "color_system": None + if self.target is RenderTarget.TEXT + else typer_rich_utils.COLOR_SYSTEM, "force_terminal": typer_rich_utils.FORCE_TERMINAL, "width": self.width or typer_rich_utils.MAX_WIDTH, "stderr": stderr,