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

Function party_mapper

src/packagedcode/rubygems.py:695–708  ·  view source on GitHub ↗

Yields Party with ``role`` objects from a ``names`` list of string.

(role, names=[], emails=[])

Source from the content-addressed store, hash-verified

693
694
695def party_mapper(role, names=[], emails=[]):
696 """
697 Yields Party with ``role`` objects from a ``names`` list of string.
698 """
699 if names:
700 return (
701 models.Party(type=models.party_person, name=name, role=role)
702 for name in names
703 )
704 elif emails:
705 return (
706 models.Party(type=models.party_person, email=email, role=role)
707 for email in emails
708 )
709
710
711def get_parties(gem_data):

Callers 1

get_partiesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected