Skip to content
Myr

📝 Update the docstring of the `_make_rich_text` method (#972)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sofie Van Landeghem · committed by GitHub · parent 990efec · Browse files · 1 file+3 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−6 removed

  • other:+3 added−6 removed

1 file+3 added−6 removed

modified:typer/rich_utils.py+3 added-6 removed
147 unmodified lines
148 *, text: str, style: str = "", markup_mode: MarkupMode149) -> Union[Markdown, Text]:150 """Take a string, remove indentations, and return styled text.151152 By default, return the text as a Rich Text with the request style.153 If `rich_markdown_enable` is `True`, also parse the text for Rich markup strings.154 If `rich_markup_enable` is `True`, parse as Markdown.155156 Only one of `rich_markdown_enable` or `rich_markup_enable` can be True.157 If both are True, `rich_markdown_enable` takes precedence.152 By default, the text is not parsed for any special formatting.153 If `markup_mode` is `"rich"`, the text is parsed for Rich markup strings.154 If `markup_mode` is `"markdown"`, parse as Markdown.155 """156 # Remove indentations from input text157 text = inspect.cleandoc(text)158 if markup_mode == MARKUP_MODE_MARKDOWN:
550 unmodified lines