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

Function build_ignorables_mapping

src/licensedcode/models.py:2972–2984  ·  view source on GitHub ↗

Return a sorted mapping of ignorables built from lists of ignorable clues.

(copyrights, holders, authors, urls, emails)

Source from the content-addressed store, hash-verified

2970
2971
2972def build_ignorables_mapping(copyrights, holders, authors, urls, emails):
2973 """
2974 Return a sorted mapping of ignorables built from lists of ignorable clues.
2975 """
2976 ignorables = dict(
2977 ignorable_copyrights=sorted(copyrights or []),
2978 ignorable_holders=sorted(holders or []),
2979 ignorable_authors=sorted(authors or []),
2980 ignorable_urls=sorted(urls or []),
2981 ignorable_emails=sorted(emails or []),
2982 )
2983
2984 return {k: v for k, v in sorted(ignorables.items()) if v}
2985
2986
2987def rule_exists(text):

Callers 2

get_ignorablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected