diff --git a/docs/source/reference/text.rst b/docs/source/reference/text.rst index 76b41f4bb..0b929e44b 100644 --- a/docs/source/reference/text.rst +++ b/docs/source/reference/text.rst @@ -2,5 +2,5 @@ rich.text ========= .. automodule:: rich.text - :members: Text + :members: Text, TextType diff --git a/rich/text.py b/rich/text.py index 7091e4291..7b32967f7 100644 --- a/rich/text.py +++ b/rich/text.py @@ -38,7 +38,7 @@ _re_whitespace = re.compile(r"\s+$") TextType = Union[str, "Text"] -"""A plain string or a [Text][rich.text.Text] instance.""" +"""A plain string or a :class:`Text` instance.""" GetStyleCallable = Callable[[str], Optional[StyleType]]