Skip to content

Commit

Permalink
allow rich cast to return rich cast
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Mar 21, 2022
1 parent ef1b9b9 commit e23b0bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rich/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ def update_dimensions(self, width: int, height: int) -> "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
...


Expand Down

0 comments on commit e23b0bb

Please sign in to comment.