MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / check_duplicates

Function check_duplicates

doc/project/generate_credits.py:62–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def check_duplicates():
63 text = subprocess.check_output(['git', 'shortlog', '--summary', '--email'])
64 lines = text.decode('utf8').split('\n')
65 contributors = [line.split('\t', 1)[1].strip() for line in lines if line]
66 emails = [re.match('.*<(.*)>', line).group(1) for line in contributors]
67 email_counter = Counter(emails)
68
69 if email_counter.most_common(1)[0][1] > 1:
70 print('DUPLICATE CHECK: The following email addresses are used with '
71 'more than one name.\nConsider adding them to .mailmap.\n')
72 for email, count in email_counter.items():
73 if count > 1:
74 print('{}\n{}'.format(
75 email, '\n'.join(l for l in lines if email in l)))
76
77
78def generate_credits():

Callers 1

Calls 2

groupMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…