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

Function streamline_scanned_file

src/scancode/cli_test_utils.py:331–338  ·  view source on GitHub ↗

Modify the `scanned_file` mapping for a file in scan results in place to make it easier to test.

(scanned_file, remove_file_date=False)

Source from the content-addressed store, hash-verified

329
330
331def streamline_scanned_file(scanned_file, remove_file_date=False):
332 """
333 Modify the `scanned_file` mapping for a file in scan results in place to
334 make it easier to test.
335 """
336 streamline_errors(scanned_file.get('scan_errors', []))
337 if remove_file_date:
338 scanned_file.pop('date', None)
339
340
341def check_jsonlines_scan(

Callers 3

cleanup_scanFunction · 0.85

Calls 3

streamline_errorsFunction · 0.85
getMethod · 0.65
popMethod · 0.45

Tested by

no test coverage detected