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

Function is_credits_file

src/cluecode/linux_credits.py:50–68  ·  view source on GitHub ↗

Return True if the file is likely to be a credits file

(location)

Source from the content-addressed store, hash-verified

48
49
50def is_credits_file(location):
51 """
52 Return True if the file is likely to be a credits file
53 """
54 credits_filenames = set([
55 "credit",
56 "credits",
57 "credits.rst",
58 "credits.txt",
59 "credits.md",
60 "author",
61 "authors",
62 "authors.rst",
63 "authors.txt",
64 "authors.md",
65 ])
66
67 fn = file_name(location).lower()
68 return fn in credits_filenames
69
70
71def detect_credits_authors(location):

Callers 1

detect_credits_authorsFunction · 0.85

Calls 1

file_nameFunction · 0.90

Tested by

no test coverage detected