resolve all ruff check errors

This commit is contained in:
Taylor Wilsdon
2025-07-18 18:04:06 -04:00
parent 9f65f0f438
commit d4dc255f16
18 changed files with 21 additions and 75 deletions

View File

@@ -555,7 +555,7 @@ def get_credentials(
# Check for single-user mode
if os.getenv("MCP_SINGLE_USER_MODE") == "1":
logger.info(
f"[get_credentials] Single-user mode: bypassing session mapping, finding any credentials"
"[get_credentials] Single-user mode: bypassing session mapping, finding any credentials"
)
credentials = _find_any_credentials(credentials_base_dir)
if not credentials:

View File

@@ -172,7 +172,7 @@ class MinimalOAuthServer:
self.server_thread.join(timeout=3.0)
self.is_running = False
logger.info(f"Minimal OAuth server stopped")
logger.info("Minimal OAuth server stopped")
except Exception as e:
logger.error(f"Error stopping minimal OAuth server: {e}", exc_info=True)

View File

@@ -6,10 +6,6 @@ from datetime import datetime, timedelta
from google.auth.exceptions import RefreshError
from auth.google_auth import get_authenticated_google_service, GoogleAuthenticationError
logger = logging.getLogger(__name__)
# Import scope constants
from auth.scopes import (
GMAIL_READONLY_SCOPE, GMAIL_SEND_SCOPE, GMAIL_COMPOSE_SCOPE, GMAIL_MODIFY_SCOPE, GMAIL_LABELS_SCOPE,
DRIVE_READONLY_SCOPE, DRIVE_FILE_SCOPE,
@@ -22,6 +18,8 @@ from auth.scopes import (
TASKS_SCOPE, TASKS_READONLY_SCOPE
)
logger = logging.getLogger(__name__)
# Service configuration mapping
SERVICE_CONFIGS = {
"gmail": {"service": "gmail", "version": "v1"},
@@ -391,7 +389,6 @@ def clear_service_cache(user_email: Optional[str] = None) -> int:
def get_cache_stats() -> Dict[str, Any]:
"""Get service cache statistics."""
now = datetime.now()
valid_entries = 0
expired_entries = 0