MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / collect_keys

Function collect_keys

src/formattedcode/output_csv.py:116–120  ·  view source on GitHub ↗

Update the headers with new keys.

(mapping, key_group)

Source from the content-addressed store, hash-verified

114 seen = set()
115
116 def collect_keys(mapping, key_group):
117 """Update the headers with new keys."""
118 keys = mapping.keys()
119 headers[key_group].extend(k for k in keys if k not in seen)
120 seen.update(keys)
121
122 for scanned_file in scan:
123 path = scanned_file.pop('path')

Callers 1

flatten_scanFunction · 0.70

Calls 2

keysMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected