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

Function _render_table

Tools/c-analyzer/c_analyzer/__main__.py:82–98  ·  view source on GitHub ↗
(items, columns, relroot=None)

Source from the content-addressed store, hash-verified

80
81
82def _render_table(items, columns, relroot=None):
83 # XXX improve this
84 header = '\t'.join(columns)
85 div = '--------------------'
86 yield header
87 yield div
88 total = 0
89 for item in items:
90 rowdata = item.render_rowdata(columns)
91 row = [rowdata[c] for c in columns]
92 if relroot and 'file' in columns:
93 index = columns.index('file')
94 row[index] = os.path.relpath(row[index], relroot)
95 yield '\t'.join(row)
96 total += 1
97 yield div
98 yield f'total: {total}'
99
100
101def build_section(name, groupitems, *, relroot=None):

Callers 1

renderFunction · 0.85

Calls 3

joinMethod · 0.45
render_rowdataMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…