resolve all ruff check errors
This commit is contained in:
@@ -7,10 +7,7 @@ All Google Workspace apps (Docs, Sheets, Slides) use the Drive API for comment o
|
||||
|
||||
import logging
|
||||
import asyncio
|
||||
from typing import Dict, Any
|
||||
|
||||
from mcp import types
|
||||
from googleapiclient.errors import HttpError
|
||||
|
||||
from auth.service_decorator import require_google_service
|
||||
from core.server import server
|
||||
|
||||
@@ -6,7 +6,6 @@ from importlib import metadata
|
||||
from fastapi import Header
|
||||
from fastapi.responses import HTMLResponse
|
||||
|
||||
from mcp import types
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
from starlette.requests import Request
|
||||
@@ -18,40 +17,6 @@ from auth.oauth_responses import create_error_response, create_success_response,
|
||||
# Import shared configuration
|
||||
from auth.scopes import (
|
||||
OAUTH_STATE_TO_SESSION_ID_MAP,
|
||||
USERINFO_EMAIL_SCOPE,
|
||||
OPENID_SCOPE,
|
||||
CALENDAR_READONLY_SCOPE,
|
||||
CALENDAR_EVENTS_SCOPE,
|
||||
DRIVE_READONLY_SCOPE,
|
||||
DRIVE_FILE_SCOPE,
|
||||
GMAIL_READONLY_SCOPE,
|
||||
GMAIL_SEND_SCOPE,
|
||||
GMAIL_COMPOSE_SCOPE,
|
||||
GMAIL_MODIFY_SCOPE,
|
||||
GMAIL_LABELS_SCOPE,
|
||||
BASE_SCOPES,
|
||||
CALENDAR_SCOPES,
|
||||
DRIVE_SCOPES,
|
||||
GMAIL_SCOPES,
|
||||
DOCS_READONLY_SCOPE,
|
||||
DOCS_WRITE_SCOPE,
|
||||
CHAT_READONLY_SCOPE,
|
||||
CHAT_WRITE_SCOPE,
|
||||
CHAT_SPACES_SCOPE,
|
||||
CHAT_SCOPES,
|
||||
SHEETS_READONLY_SCOPE,
|
||||
SHEETS_WRITE_SCOPE,
|
||||
SHEETS_SCOPES,
|
||||
FORMS_BODY_SCOPE,
|
||||
FORMS_BODY_READONLY_SCOPE,
|
||||
FORMS_RESPONSES_READONLY_SCOPE,
|
||||
FORMS_SCOPES,
|
||||
SLIDES_SCOPE,
|
||||
SLIDES_READONLY_SCOPE,
|
||||
SLIDES_SCOPES,
|
||||
TASKS_SCOPE,
|
||||
TASKS_READONLY_SCOPE,
|
||||
TASKS_SCOPES,
|
||||
SCOPES
|
||||
)
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import io
|
||||
import logging
|
||||
import os
|
||||
import tempfile
|
||||
import zipfile, xml.etree.ElementTree as ET
|
||||
import zipfile
|
||||
import xml.etree.ElementTree as ET
|
||||
import ssl
|
||||
import time
|
||||
import asyncio
|
||||
import functools
|
||||
|
||||
@@ -70,7 +69,7 @@ def check_credentials_directory_permissions(credentials_dir: str = None) -> None
|
||||
try:
|
||||
if os.path.exists(credentials_dir):
|
||||
os.rmdir(credentials_dir)
|
||||
except:
|
||||
except (PermissionError, OSError):
|
||||
pass
|
||||
raise PermissionError(
|
||||
f"Cannot create or write to credentials directory '{os.path.abspath(credentials_dir)}': {e}"
|
||||
|
||||
Reference in New Issue
Block a user