File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ def generate_tree_from_commits(
102102 current_tag_date = current_tag .date
103103
104104 changes : defaultdict [str | None , list ] = defaultdict (list )
105- used_tags = [current_tag ]
105+ used_tags : set [ GitTag | None ] = set ( [current_tag ])
106106 for commit in commits :
107107 commit_tag = get_commit_tag (commit , tags )
108108
@@ -111,7 +111,7 @@ def generate_tree_from_commits(
111111 and commit_tag not in used_tags
112112 and rules .include_in_changelog (commit_tag )
113113 ):
114- used_tags .append (commit_tag )
114+ used_tags .add (commit_tag )
115115 release = {
116116 "version" : current_tag_name ,
117117 "date" : current_tag_date ,
@@ -298,7 +298,7 @@ def get_smart_tag_range(
298298 """
299299 oldest = oldest or newest
300300
301- names = [ tag .name for tag in tags ]
301+ names = set ( tag .name for tag in tags )
302302 has_newest = newest in names
303303 has_oldest = oldest in names
304304 if not has_newest and not has_oldest :
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ def __eq__(self, other) -> bool:
4141 return False
4242 return self .rev == other .rev # type: ignore
4343
44+ def __hash__ (self ):
45+ return hash (self .rev )
46+
4447
4548class GitCommit (GitObject ):
4649 def __init__ (
You can’t perform that action at this time.
0 commit comments