Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions typer/_completion_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def _sanitize_help_text(text: str) -> str:
"""Sanitizes the help text by removing rich tags"""
if not importlib.util.find_spec("rich"):
return text
# Respect TYPER_USE_RICH environment variable
if os.getenv("TYPER_USE_RICH", "").lower() in ("false", "0", "no", "off"):
return text
from . import rich_utils

return rich_utils.rich_render_text(text)
Expand Down
Loading