summaryrefslogtreecommitdiffstats
path: root/rich/protocol.py
blob: 6468e5316928608228025551fc1eb802b7476f04 (plain)
1
2
3
4
5
6
7
8
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 isinstance(check_object, RichRenderable)