We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f0e135 commit 138896bCopy full SHA for 138896b
src/apipkg/__init__.py
@@ -161,14 +161,13 @@ def __init__(
161
self.__map__[name] = (modpath, attrname)
162
163
def __repr__(self):
164
- repr_list = []
+ repr_list = [f"<ApiModule {self.__name__!r}"]
165
if hasattr(self, "__version__"):
166
- repr_list.append("version=" + repr(self.__version__))
+ repr_list.append(f" version={self.__version__!r}")
167
if hasattr(self, "__file__"):
168
- repr_list.append("from " + repr(self.__file__))
169
- if repr_list:
170
- return "<ApiModule {!r} {}>".format(self.__name__, " ".join(repr_list))
171
- return f"<ApiModule {self.__name__!r}>"
+ repr_list.append(f" from {self.__file__!r}")
+ repr_list.append(">")
+ return "".join(repr_list)
172
173
@_synchronized
174
def __makeattr(self, name, isgetattr=False):
0 commit comments