refac & cleanup
This commit is contained in:
@@ -116,7 +116,7 @@ async def list_calendars(
|
||||
required_scopes=[CALENDAR_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -193,7 +193,7 @@ async def get_events(
|
||||
)
|
||||
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -324,7 +324,7 @@ async def create_event(
|
||||
required_scopes=[CALENDAR_EVENTS_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -426,7 +426,7 @@ async def modify_event(
|
||||
required_scopes=[CALENDAR_EVENTS_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -566,7 +566,7 @@ async def delete_event(
|
||||
required_scopes=[CALENDAR_EVENTS_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
|
||||
@@ -41,7 +41,7 @@ async def list_spaces(
|
||||
required_scopes=[CHAT_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -175,7 +175,7 @@ async def send_message(
|
||||
required_scopes=[CHAT_WRITE_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -230,7 +230,7 @@ async def search_messages(
|
||||
required_scopes=[CHAT_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
|
||||
@@ -44,7 +44,7 @@ async def search_docs(
|
||||
required_scopes=[DRIVE_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -226,7 +226,7 @@ async def list_docs_in_folder(
|
||||
required_scopes=[DRIVE_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
drive_service, user_email = auth_result # user_email will be consistent
|
||||
|
||||
try:
|
||||
|
||||
@@ -61,7 +61,7 @@ async def search_drive_files(
|
||||
required_scopes=[DRIVE_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
|
||||
@@ -226,7 +226,7 @@ async def get_gmail_message_content(
|
||||
required_scopes=[GMAIL_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -333,7 +333,7 @@ async def get_gmail_messages_content_batch(
|
||||
required_scopes=[GMAIL_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -510,7 +510,7 @@ async def send_gmail_message(
|
||||
required_scopes=[GMAIL_SEND_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -583,7 +583,7 @@ async def draft_gmail_message(
|
||||
required_scopes=[GMAIL_COMPOSE_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
@@ -658,7 +658,7 @@ async def get_gmail_thread_content(
|
||||
required_scopes=[GMAIL_READONLY_SCOPE],
|
||||
)
|
||||
if isinstance(auth_result, types.CallToolResult):
|
||||
return auth_result # Auth error
|
||||
return auth_result
|
||||
service, user_email = auth_result
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user