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

Method __repr__

detrsmpl/utils/util_mixins.py:86–94  ·  view source on GitHub ↗

str: the string of the module

(self)

Source from the content-addressed store, hash-verified

84 f'Define the __nice__ method for {self.__class__!r}')
85
86 def __repr__(self):
87 """str: the string of the module"""
88 try:
89 nice = self.__nice__()
90 classname = self.__class__.__name__
91 return f'<{classname}({nice}) at {hex(id(self))}>'
92 except NotImplementedError as ex:
93 warnings.warn(str(ex), category=RuntimeWarning)
94 return object.__repr__(self)
95
96 def __str__(self):
97 """str: the string of the module"""

Callers 1

__str__Method · 0.45

Calls 1

__nice__Method · 0.95

Tested by

no test coverage detected