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

Function get_emails

src/packagedcode/spec.py:97–106  ·  view source on GitHub ↗

Return a list of emails extracted from a text ``line``, or None

(line)

Source from the content-addressed store, hash-verified

95
96
97def get_emails(line):
98 """
99 Return a list of emails extracted from a text ``line``, or None
100 """
101 if '.email' in line:
102 _key, _sep, value = line.rpartition('=')
103 stripped_emails = get_cleaned_string(value)
104 stripped_emails = stripped_emails.strip()
105 stripped_emails = stripped_emails.split(',')
106 return stripped_emails
107
108
109def get_authors(line):

Callers

nothing calls this directly

Calls 2

get_cleaned_stringFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected