MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / __rich__

Method __rich__

scratchattach/site/session.py:112–136  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110 return f"-L {self.username}"
111
112 def __rich__(self):
113 from rich.panel import Panel
114 from rich.table import Table
115 from rich import box
116 from rich.markup import escape
117
118 try:
119 self.update()
120 except KeyError as e:
121 warnings.warn(f"Ignored KeyError: {e}")
122
123 ret = Table(
124 f"[link={self.connect_linked_user().url}]{escape(self.username)}[/]", f"Created: {self.time_created}", expand=True
125 )
126
127 ret.add_row("Email", escape(str(self.email)))
128 ret.add_row("Language", escape(str(self.language)))
129 ret.add_row("Mute status", escape(str(self.mute_status)))
130 ret.add_row("New scratcher?", str(self.new_scratcher))
131 ret.add_row("Banned?", str(self.banned))
132 ret.add_row("Has outstanding email confirmation?", str(self.has_outstanding_email_confirmation))
133 ret.add_row("Is teacher invitee?", str(self.is_teacher_invitee))
134 ret.add_row("Is teacher?", str(self.is_teacher))
135
136 return ret
137
138 @property
139 def _username(self) -> str:

Callers

nothing calls this directly

Calls 2

connect_linked_userMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected