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

Method clean

etc/scripts/licenses/synclic.py:59–74  ·  view source on GitHub ↗

Redump licenses YAML re-applying pretty-printing.

(self)

Source from the content-addressed store, hash-verified

57 self.by_spdx_key = get_licenses_by_spdx_key(self.by_key.values())
58
59 def clean(self):
60 """
61 Redump licenses YAML re-applying pretty-printing.
62 """
63 for lic in self.by_key.values():
64 updated = False
65 if lic.standard_notice:
66 updated = True
67 lic.standard_notice = clean_text(lic.standard_notice)
68 if lic.notes:
69 updated = True
70 lic.notes = clean_text(lic.notes)
71
72 if updated:
73 models.update_ignorables(lic, verbose=False)
74 lic.dump(licenses_data_dir=licensedcode.models.licenses_data_dir)
75
76
77class ExternalLicensesSource:

Callers 2

hFunction · 0.80

Calls 3

clean_textFunction · 0.70
valuesMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected