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

Function m_maintainer_handler

src/packagedcode/alpine.py:941–955  ·  view source on GitHub ↗

Return a Package data mapping as a list of parties a maintainer Party. A maintainer value may be one or more mail name parts, space-separated.

(value, **kwargs)

Source from the content-addressed store, hash-verified

939
940
941def m_maintainer_handler(value, **kwargs):
942 """
943 Return a Package data mapping as a list of parties a maintainer Party.
944 A maintainer value may be one or more mail name <email@example.com> parts, space-separated.
945 """
946 parties = []
947 for name, email in get_maintainers(value):
948 maintainer = models.Party(
949 type='person',
950 role='maintainer',
951 name=name,
952 email=email,
953 )
954 parties.append(maintainer.to_dict())
955 return {'parties': parties}
956
957
958# this will return a three tuple if there is a split or a single item otherwise

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
to_dictMethod · 0.45

Tested by

no test coverage detected