From 26ea8d92d6ee989ce26a4aacc98fd741331dfcae Mon Sep 17 00:00:00 2001 From: zyf1229 <838118031@qq.com> Date: Sun, 12 May 2024 15:33:42 -0400 Subject: [PATCH] reformatted --- src/open_source_python_template/crawlTasks.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/open_source_python_template/crawlTasks.py b/src/open_source_python_template/crawlTasks.py index 139f0de..8f7e5a1 100644 --- a/src/open_source_python_template/crawlTasks.py +++ b/src/open_source_python_template/crawlTasks.py @@ -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()) @@ -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