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

+8 -11
View File
@@ -3,19 +3,16 @@ import io
import json
import logging
import os
from typing import Optional, List
import requests
from fastapi import Request
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
from open_webui.utils.headers import include_user_info_headers
from open_webui.env import FORWARD_SESSION_INFO_HEADER_CHAT_ID
from typing import List, Optional
from xml.etree import ElementTree as ET
from xml.etree.ElementTree import Element
import requests
from fastapi import Request
from open_webui.env import FORWARD_SESSION_INFO_HEADER_CHAT_ID
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
from open_webui.utils.headers import include_user_info_headers
log = logging.getLogger(__name__)
@@ -122,8 +119,8 @@ def search_yandex(
if __name__ == '__main__':
from starlette.datastructures import Headers
from fastapi import FastAPI
from starlette.datastructures import Headers
result = search_yandex(
Request(