yield from self.__typeids
def __repr__(self):
- return f"{self.__class__.__name__}({self.__typeids!r})"
+ names = []
+ for typeid in self.__typeids:
+ name = typeid.__qualname__
+ module = typeid.__module__
+ if module not in ("builtins",):
+ name = f"{module}.{name}"
+ names.append(name)
+ return f"<{', '.join(names)}>"
def __call__(self, call):
if not callable(call):
yield from self.__typeids
def __repr__(self):
- return f"{self.__class__.__name__}(call={self.__call!r}, typeids={self.__typeids!r})"
+ return repr(self.__typeids)
def __call__(self, dispatcher, instance):
return self.__call(dispatcher, instance)