From 87e2da7c786410b39aaaaf70c26884942cb5d84f Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 9 Oct 2023 15:14:53 +0100 Subject: [PATCH] Share repo handle --- googlefonts/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/googlefonts/__init__.py b/googlefonts/__init__.py index 5cd4849..bb4bb21 100644 --- a/googlefonts/__init__.py +++ b/googlefonts/__init__.py @@ -28,6 +28,7 @@ LANGUAGE_COMMENTS = LanguageComments(LoadLanguages()) A_YEAR_AGO = datetime.now(timezone.utc) - timedelta(days=365) +GF_REPO = GITHUB.get_repo("google/fonts") class GoogleFont: @@ -151,7 +152,6 @@ def seems_gfr(self): @cached_property def recent_commits(self): - GF_REPO = GITHUB.get_repo("google/fonts") try: commits = GF_REPO.get_commits(path=self.directory, since=A_YEAR_AGO) return list(commits[0:10]) @@ -160,7 +160,6 @@ def recent_commits(self): @cached_property def recent_pulls(self): - GF_REPO = GITHUB.get_repo("google/fonts") try: pulls = [] pull_numbers = set()