Skip to content

Commit 4a93990

Browse files
committed
chore: typing
1 parent b827039 commit 4a93990

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

mknodes/info/gitrepository.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,12 @@ def version_changes(self) -> dict[str, dict[str, list[git.Commit]]]: # type: ig
122122
groups = iterfilters.groupby(
123123
commits, self.get_version_for_commit, natural_sort=True
124124
)
125-
return {
126-
k: iterfilters.groupby(v, lambda x: x.message.split(":")[0])
127-
for k, v in groups.items()
128-
}
125+
126+
def get_commit_group(commit: git.Commit) -> str:
127+
assert isinstance(commit.message, str)
128+
return commit.message.split(":")[0]
129+
130+
return {k: iterfilters.groupby(v, get_commit_group) for k, v in groups.items()}
129131

130132
@functools.cached_property
131133
def all_commits(self) -> list[git.Commit]: # type: ignore[name-defined]

0 commit comments

Comments
 (0)