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

Method export

src/licensedcode/frontmatter.py:79–84  ·  view source on GitHub ↗

Export metadata as YAML.

(self, metadata, **kwargs)

Source from the content-addressed store, hash-verified

77 return saneyaml.load(fm, allow_duplicate_keys=False, **kwargs)
78
79 def export(self, metadata, **kwargs):
80 """
81 Export metadata as YAML.
82 """
83 metadata = saneyaml.dump(metadata, indent=4, encoding='utf-8', **kwargs).strip()
84 return return_unicode(metadata) # ensure unicode
85
86
87def return_unicode(text, encoding="utf-8"):

Callers 1

formatMethod · 0.95

Calls 2

return_unicodeFunction · 0.85
dumpMethod · 0.45

Tested by

no test coverage detected