refac: modernize imports, standardize type hints and docstrings

This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-12 06:30:38 +09:00
1 parent 998c86a52b
commit a59c967d7e
16 files changed
+118 -142

No files matched your search

+3 -3
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import logging
from typing import Optional
from urllib.parse import urlencode
import requests
@@ -7,7 +8,6 @@ from open_webui.retrieval.web.main import SearchResult, get_filtered_results
log = logging.getLogger(__name__)
def search_serply(
api_key: str,
query: str,
@@ -16,7 +16,7 @@ def search_serply(
limit: int = 10,
device_type: str = 'desktop',
proxy_location: str = 'US',
filter_list: Optional[list[str]] = None,
filter_list: list[str | None] = None,
) -> list[SearchResult]:
"""Search using serper.dev's API and return the results as a list of SearchResult objects.