Make a default title.
(self, obj: Any)
| 62 | self.value = value |
| 63 | |
| 64 | def _make_title(self, obj: Any) -> Text: |
| 65 | """Make a default title.""" |
| 66 | title_str = ( |
| 67 | str(obj) |
| 68 | if (isclass(obj) or callable(obj) or ismodule(obj)) |
| 69 | else str(type(obj)) |
| 70 | ) |
| 71 | title_text = self.highlighter(title_str) |
| 72 | return title_text |
| 73 | |
| 74 | def __rich__(self) -> Panel: |
| 75 | return Panel.fit( |