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

Function streamline_headers

src/scancode/cli_test_utils.py:316–328  ·  view source on GitHub ↗

Modify the `headers` list of mappings in place to make it easier to test.

(headers)

Source from the content-addressed store, hash-verified

314
315
316def streamline_headers(headers):
317 """
318 Modify the `headers` list of mappings in place to make it easier to test.
319 """
320 for hle in headers:
321 hle.pop('tool_version', None)
322 remove_windows_extra_timeout(hle.get('options', {}))
323 hle.pop('start_timestamp', None)
324 hle.pop('end_timestamp', None)
325 hle.pop('duration', None)
326 header = hle.get('options', {})
327 header.pop('--verbose', None)
328 streamline_errors(hle['errors'])
329
330
331def streamline_scanned_file(scanned_file, remove_file_date=False):

Callers 3

cleanup_scanFunction · 0.85

Calls 4

streamline_errorsFunction · 0.85
getMethod · 0.65
popMethod · 0.45

Tested by

no test coverage detected