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

Function get_parties

src/packagedcode/cargo.py:372–384  ·  view source on GitHub ↗

Yields Party of `party_role` given a list of ``person_names`` strings. https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field-optional

(person_names, party_role)

Source from the content-addressed store, hash-verified

370
371
372def get_parties(person_names, party_role):
373 """
374 Yields Party of `party_role` given a list of ``person_names`` strings.
375 https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field-optional
376 """
377 for person_name in person_names:
378 name, email = parse_person(person_name)
379 yield models.Party(
380 type=models.party_person,
381 name=name,
382 role=party_role,
383 email=email,
384 ).to_dict()
385
386
387person_parser = re.compile(

Callers 2

parseMethod · 0.70

Calls 2

parse_personFunction · 0.70
to_dictMethod · 0.45

Tested by

no test coverage detected