Check if an object may be expanded by pretty print.
(obj: Any)
| 396 | |
| 397 | |
| 398 | def is_expandable(obj: Any) -> bool: |
| 399 | """Check if an object may be expanded by pretty print.""" |
| 400 | return ( |
| 401 | _safe_isinstance(obj, _CONTAINERS) |
| 402 | or (is_dataclass(obj)) |
| 403 | or (hasattr(obj, "__rich_repr__")) |
| 404 | or _is_attr_object(obj) |
| 405 | ) and not isclass(obj) |
| 406 | |
| 407 | |
| 408 | @dataclass |
no test coverage detected