Skip to content

Commit 64bb384

Browse files
Update google-sheet-sync/sync.py
Co-authored-by: Verena Chung <[email protected]>
1 parent 7c0b9bb commit 64bb384

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

google-sheet-sync/sync.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@
66
from googleapiclient.discovery import build
77
from github import Github, GithubException
88

9-
def authenticate_google(credentials_file):
10-
"""
11-
Authenticate and create a Google Sheets API client.
9+
def authenticate_google(credentials_file: str) -> googleapiclient.discovery.Resource:
10+
"""Authenticate and create a Google Sheets API client.
1211
1312
This function reads a Google service account credentials file to authenticate
1413
and build a client for accessing the Google Sheets API.
14+
1515
Args:
16-
credentials_file (str): The path to the Google service account JSON credentials file.
17-
GOOGLE_CREDENTIALS stored securely as GitHub Secret on the mc2-centerbot account
16+
credentials_file: The path to the Google service account JSON credentials file.
1817
1918
Returns:
20-
googleapiclient.discovery.Resource: An authenticated client object for interacting
21-
with the Google Sheets API.
19+
An authenticated client object for interacting with the Google Sheets API.
2220
2321
"""
2422
creds = Credentials.from_service_account_file(credentials_file, scopes=["https://www.googleapis.com/auth/spreadsheets.readonly"])

0 commit comments

Comments
 (0)