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

Function build_section

Tools/c-analyzer/c_analyzer/__main__.py:101–117  ·  view source on GitHub ↗
(name, groupitems, *, relroot=None)

Source from the content-addressed store, hash-verified

99
100
101def build_section(name, groupitems, *, relroot=None):
102 info = TABLE_SECTIONS[name]
103 while type(info) is not tuple:
104 if name in KINDS:
105 name = info
106 info = TABLE_SECTIONS[info]
107
108 columns, match_kind, sortkey = info
109 items = (v for v in groupitems if match_kind(v.kind))
110 items = sorted(items, key=sortkey)
111 def render():
112 yield ''
113 yield f'{name}:'
114 yield ''
115 for line in _render_table(items, columns, relroot):
116 yield line
117 return items, render
118
119
120#######################################

Callers 1

sectionFunction · 0.85

Calls 1

match_kindFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…