From d2a277afe8349b9ab46245014b4f4073d5960e1a Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Tue, 5 Dec 2023 10:08:18 +0530 Subject: [PATCH] feat: use ignored_repos flag in make_language_per_repo_list --- sources/graphics_list_formatter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sources/graphics_list_formatter.py b/sources/graphics_list_formatter.py index d7c0a28b..6c7d80d2 100644 --- a/sources/graphics_list_formatter.py +++ b/sources/graphics_list_formatter.py @@ -130,9 +130,10 @@ def make_language_per_repo_list(repositories: Dict) -> str: language_count = dict() repos_with_language = [repo for repo in repositories if repo["primaryLanguage"] is not None] for repo in repos_with_language: - language = repo["primaryLanguage"]["name"] - language_count[language] = language_count.get(language, {"count": 0}) - language_count[language]["count"] += 1 + if repo["name"] not in EM.IGNORED_REPOS: + language = repo["primaryLanguage"]["name"] + language_count[language] = language_count.get(language, {"count": 0}) + language_count[language]["count"] += 1 names = list(language_count.keys()) texts = [f"{language_count[lang]['count']} {'repo' if language_count[lang]['count'] == 1 else 'repos'}" for lang in names]