Skip to content

Commit

Permalink
feat: readd excluded language handling
Browse files Browse the repository at this point in the history
  • Loading branch information
boidolr authored Feb 22, 2024
1 parent a00d42d commit 8e3a4d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions github_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ def __init__(
):
self.username = username
self._ignore_forked_repos = ignore_forked_repos
self._exclude_repos = set() if exclude_repos is None else exclude_repos
self._exclude_langs = set() if exclude_langs is None else exclude_langs
self._exclude_repos = exclude_repos or set()
self._exclude_langs = exclude_langs or set()
self.queries = Queries(username, access_token, session)

self._name = None
Expand Down Expand Up @@ -560,8 +560,11 @@ async def main() -> None:
"""
access_token = os.getenv("ACCESS_TOKEN")
user = os.getenv("GITHUB_ACTOR")
excluded_langs = os.getenv("EXCLUDED_LANGS")
exclude_langs = set(excluded_langs.split(",")) if excluded_langs else None

async with aiohttp.ClientSession() as session:
s = Stats(user, access_token, session)
s = Stats(user, access_token, session, exclude_langs=exclude_langs)
print(await s.to_str())


Expand Down

0 comments on commit 8e3a4d2

Please sign in to comment.