MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __repr__

Method __repr__

util/utils.py:367–375  ·  view source on GitHub ↗

str: the string of the module

(self)

Source from the content-addressed store, hash-verified

365 f'Define the __nice__ method for {self.__class__!r}')
366
367 def __repr__(self):
368 """str: the string of the module"""
369 try:
370 nice = self.__nice__()
371 classname = self.__class__.__name__
372 return f'<{classname}({nice}) at {hex(id(self))}>'
373 except NotImplementedError as ex:
374 warnings.warn(str(ex), category=RuntimeWarning)
375 return object.__repr__(self)
376
377 def __str__(self):
378 """str: the string of the module"""

Callers 1

__str__Method · 0.45

Calls 1

__nice__Method · 0.95

Tested by

no test coverage detected