mirror of https://github.com/Textualize/rich.git
missed files
This commit is contained in:
parent
2a53a15284
commit
6246b1de16
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
After Width: | Height: | Size: 401 KiB |
|
@ -0,0 +1,11 @@
|
|||
from typing import Any
|
||||
|
||||
|
||||
def is_renderable(test_renderable: Any) -> bool:
|
||||
"""Check if an object may be rendered by Rich."""
|
||||
return (
|
||||
isinstance(test_renderable, str)
|
||||
or hasattr(test_renderable, "__console__")
|
||||
or hasattr(test_renderable, "__rich__")
|
||||
)
|
||||
|
Loading…
Reference in New Issue