mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-29 02:55:52 +00:00
13 lines
313 B
Python
13 lines
313 B
Python
|
from typing import Any
|
||
|
|
||
|
from .abc import RichRenderable
|
||
|
|
||
|
|
||
|
def is_renderable(check_object: Any) -> bool:
|
||
|
"""Check if an object may be rendered by Rich."""
|
||
|
return (
|
||
|
isinstance(check_object, str)
|
||
|
or hasattr(check_object, "__rich__")
|
||
|
or hasattr(check_object, "__rich_console__")
|
||
|
)
|