def __repr__(self): if self.body: if isinstance(self.body, _chain): return remove_repeating_from_task( self.body.tasks[0]['task'], '%({0} | {1!r})'.format( self.body.tasks[0].reprcall(self.tasks), chain(self.body.tasks[1:], app=self._app), ), ) return '%' + remove_repeating_from_task( self.body['task'], self.body.reprcall(self.tasks)) return '<chord without body: {0.tasks!r}>'.format(self)
def __repr__(self): if not self.tasks: return '<{0}@{1:#x}: empty>'.format( type(self).__name__, id(self)) return remove_repeating_from_task( self.tasks[0]['task'], ' | '.join(repr(t) for t in self.tasks))
def __repr__(self): if self.tasks: return remove_repeating_from_task( self.tasks[0]['task'], 'group({0.tasks!r})'.format(self)) return 'group(<empty>)'