Skip to content

Commit

Permalink
reformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
zyf1229 committed May 12, 2024
1 parent 406a32d commit 26ea8d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/open_source_python_template/crawlTasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ def get_tasks():
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file("credential.json", SCOPES)
flow = InstalledAppFlow.from_client_secrets_file(
"src/open_source_python_template/credential.json", SCOPES
)
creds = flow.run_local_server(port=0)
with open("token.json", "w") as token:
token.write(creds.to_json())
Expand All @@ -42,6 +44,9 @@ def get_tasks():
"id": task["id"],
"tasklist_id": tasklist["id"],
"tasklist_title": tasklist["title"],
"taskdescription": task["notes"]
if "notes" in task
else "No description available",
}
)
return tasks_response
Expand Down

0 comments on commit 26ea8d9

Please sign in to comment.