style: auto-fix ruff lint and format

This commit is contained in:
github-actions[bot]
2026-02-18 16:49:48 +00:00
parent a28fa0a249
commit 950206c707
4 changed files with 24 additions and 7 deletions

View File

@@ -587,7 +587,11 @@ def get_credentials(
)
# Refresh expired credentials before checking scopes
if not credentials.valid and credentials.expired and credentials.refresh_token:
if (
not credentials.valid
and credentials.expired
and credentials.refresh_token
):
try:
credentials.refresh(Request())
logger.info(

View File

@@ -84,7 +84,12 @@ SCRIPT_METRICS_SCOPE = "https://www.googleapis.com/auth/script.metrics"
# See https://developers.google.com/gmail/api/auth/scopes,
# https://developers.google.com/drive/api/guides/api-specific-auth, etc.
SCOPE_HIERARCHY = {
GMAIL_MODIFY_SCOPE: {GMAIL_READONLY_SCOPE, GMAIL_SEND_SCOPE, GMAIL_COMPOSE_SCOPE, GMAIL_LABELS_SCOPE},
GMAIL_MODIFY_SCOPE: {
GMAIL_READONLY_SCOPE,
GMAIL_SEND_SCOPE,
GMAIL_COMPOSE_SCOPE,
GMAIL_LABELS_SCOPE,
},
DRIVE_SCOPE: {DRIVE_READONLY_SCOPE, DRIVE_FILE_SCOPE},
CALENDAR_SCOPE: {CALENDAR_READONLY_SCOPE, CALENDAR_EVENTS_SCOPE},
DOCS_WRITE_SCOPE: {DOCS_READONLY_SCOPE},