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

Function get_authors

src/packagedcode/spec.py:109–119  ·  view source on GitHub ↗

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

(line)

Source from the content-addressed store, hash-verified

107
108
109def get_authors(line):
110 """
111 Return a list of authors extracted from a text ``line``, or None
112 """
113 if '.author' in line:
114 authors = re.sub(r'/*.*author.*?=', '', line)
115 stripped_authors = get_cleaned_string(authors)
116 stripped_authors = re.sub(r'(\s*=>\s*)', '=>', stripped_authors)
117 stripped_authors = stripped_authors.strip()
118 stripped_authors = stripped_authors.split(',')
119 return stripped_authors
120
121
122# mapping of parser callable by its field name

Callers

nothing calls this directly

Calls 2

get_cleaned_stringFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected