MCPcopy
hub / github.com/celery/celery / repr_node

Method repr_node

celery/utils/graph.py:214–221  ·  view source on GitHub ↗
(self, obj, level=1, fmt='{0}({1})')

Source from the content-addressed store, hash-verified

212 return '\n'.join(self.repr_node(N) for N in self)
213
214 def repr_node(self, obj, level=1, fmt='{0}({1})'):
215 output = [fmt.format(obj, self.valency_of(obj))]
216 if obj in self:
217 for other in self[obj]:
218 d = fmt.format(other, self.valency_of(other))
219 output.append(' ' * level + d)
220 output.extend(self.repr_node(other, level + 1).split('\n')[1:])
221 return '\n'.join(output)
222
223
224class GraphFormatter:

Callers 2

__repr__Method · 0.95
test_repr_nodeMethod · 0.80

Calls 4

valency_ofMethod · 0.95
formatMethod · 0.45
extendMethod · 0.45
joinMethod · 0.45

Tested by 1

test_repr_nodeMethod · 0.64