Last active
August 16, 2023 19:40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stars_by_repo(star_count: Collect[Tuple[str, int]]) -> Dict[str, int]: | |
"""Aggregates the star count for each repo into a dictionary, so we | |
can generate paginated requests. | |
:param star_count: A tuple of the repo name and the star count | |
:return: The star count for each repo | |
""" | |
star_count_dict = {} | |
for repo_name, stars in star_count: | |
star_count_dict[repo_name] = stars | |
return star_count_dict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment