MCPcopy Index your code
hub / github.com/python/cpython / render

Function render

Lib/asyncio/tools.py:166–174  ·  view source on GitHub ↗
(node, prefix="", last=True, buf=None)

Source from the content-addressed store, hash-verified

164 return f"{flag} {labels[node]}"
165
166 def render(node, prefix="", last=True, buf=None):
167 if buf is None:
168 buf = []
169 buf.append(f"{prefix}{'└── ' if last else '├── '}{pretty(node)}")
170 new_pref = prefix + (" " if last else "│ ")
171 kids = children.get(node, [])
172 for i, kid in enumerate(kids):
173 render(kid, new_pref, i == len(kids) - 1, buf)
174 return buf
175
176 return [render(root) for root in _roots(labels, children)]
177

Callers 1

build_async_treeFunction · 0.70

Calls 4

enumerateFunction · 0.85
prettyFunction · 0.70
appendMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…