refac: modernize type annotations (PEP 604 / PEP 585)

This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-12 17:10:15 +09:00
1 parent a59c967d7e
commit 6d0295588e
197 files changed
+3265 -3488

No files matched your search

+12 -13
View File
@@ -3,28 +3,27 @@ import time
from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Request, status
from open_webui.constants import ERROR_MESSAGES
from open_webui.models.access_grants import AccessGrants
from open_webui.models.calendar import (
Calendars,
CalendarEvents,
CalendarEventAttendees,
CalendarForm,
CalendarUpdateForm,
CalendarEventForm,
CalendarEventUpdateForm,
CalendarModel,
CalendarEventModel,
CalendarEventUserResponse,
CalendarEventListResponse,
CalendarEventModel,
CalendarEvents,
CalendarEventUpdateForm,
CalendarEventUserResponse,
CalendarForm,
CalendarModel,
Calendars,
CalendarUpdateForm,
RSVPForm,
)
from open_webui.models.access_grants import AccessGrants
from open_webui.models.groups import Groups
from open_webui.models.users import UserModel
from open_webui.utils.access_control import filter_allowed_access_grants, has_permission
from open_webui.utils.auth import get_verified_user
from open_webui.utils.access_control import has_permission, filter_allowed_access_grants
from open_webui.utils.calendar import expand_recurring_event
from open_webui.constants import ERROR_MESSAGES
log = logging.getLogger(__name__)
@@ -188,7 +187,7 @@ async def get_events(
cal_id_list is None or SCHEDULED_TASKS_CALENDAR_ID in cal_id_list
):
try:
from open_webui.models.automations import Automations, AutomationRuns
from open_webui.models.automations import AutomationRuns, Automations
# Future runs: expand RRULEs for active automations only
active_automations = await Automations.get_active_by_user(user.id)