allow rich cast to return rich cast

This commit is contained in:
Will McGugan 2022-03-21 16:55:18 +00:00
parent ef1b9b91cc
commit e23b0bb3da
1 changed files with 3 additions and 1 deletions

View File

@ -265,7 +265,9 @@ class ConsoleOptions:
class RichCast(Protocol):
"""An object that may be 'cast' to a console renderable."""
def __rich__(self) -> Union["ConsoleRenderable", str]: # pragma: no cover
def __rich__(
self,
) -> Union["ConsoleRenderable", "RichCast", str]: # pragma: no cover
...