MCPcopy
hub / github.com/celery/celery / Formatter

Class Formatter

celery/bin/graph.py:81–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 )
80
81 class Formatter(GraphFormatter):
82
83 def label(self, obj):
84 return obj and obj.label()
85
86 def node(self, obj):
87 scheme = dict(obj.scheme) if obj.pos else obj.scheme
88 if isinstance(obj, Thread):
89 scheme['label'] = obj.real_label
90 return self.draw_node(
91 obj, dict(self.node_scheme, **scheme),
92 )
93
94 def terminal_node(self, obj):
95 return self.draw_node(
96 obj, dict(self.term_scheme, **obj.scheme),
97 )
98
99 def edge(self, a, b, **attrs):
100 if isinstance(a, Thread):
101 attrs.update(arrowhead='none', arrowtail='tee')
102 return self.draw_edge(a, b, self.edge_scheme, attrs)
103
104 def subscript(n):
105 S = {'0': '₀', '1': '₁', '2': '₂', '3': '₃', '4': '₄',

Callers 1

workersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected