MCPcopy
hub / github.com/Textualize/rich / _make_title

Method _make_title

rich/_inspect.py:64–72  ·  view source on GitHub ↗

Make a default title.

(self, obj: Any)

Source from the content-addressed store, hash-verified

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(

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected