Skip to content

Commit

Permalink
Simplify update-authors.py
Browse files Browse the repository at this point in the history
Before this change, there was effectively two for loops, one for the
list comprehension and one to iterate over the resulting list.
Generating the list wasn’t necessary since the code would just
immediately iterate over the list after it was generated, and then never
do anything with the list ever again.
  • Loading branch information
Jayman2000 committed Feb 18, 2023
1 parent a8e8066 commit a770b4a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions update-authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

git_log = subprocess.check_output(['git', 'shortlog', '--summary', '--email'])
log_entries = git_log.decode('utf-8').strip().split('\n')
authors = [author_re.search(entry).group(0) for entry in log_entries]


print("Galaxy has been contribued to by the following authors:\n"
"This list is automatically generated - please file an issue for corrections)\n")
for author in authors:
print(author)
for entry in log_entries:
print(author_re.search(entry).group(0))

0 comments on commit a770b4a

Please sign in to comment.