From d49c97bd272c3171357b632f1c79d8a3f44e5311 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Wed, 7 May 2014 11:12:43 -0400 Subject: [PATCH] return tuple, not list so the output can be memoized --- scripts/release.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index f14475f857..3f54b1dfd7 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -341,11 +341,11 @@ def generate_pr_table(start_ref, end_ref): @memoized def get_commits_not_in_prs(start_ref, end_ref): """ - Return a list of commits that exist between start_ref and end_ref, + Return a tuple of commits that exist between start_ref and end_ref, but were not merged to the end_ref. If everyone is following the - pull request process correctly, this should return an empty list. + pull request process correctly, this should return an empty tuple. """ - return list(Commit.iter_items( + return tuple(Commit.iter_items( repo, "{start}..{end}".format(start=start_ref, end=end_ref), first_parent=True, no_merges=True, @@ -420,7 +420,7 @@ def main(): ) print("\n") print(generate_pr_table(args.previous, args.current)) - commits_without_prs = list(get_commits_not_in_prs(args.previous, args.current)) + commits_without_prs = get_commits_not_in_prs(args.previous, args.current) if commits_without_prs: num = len(commits_without_prs) plural = num > 1