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,14 +1,14 @@
from __future__ import annotations
import json
import logging
from typing import Optional
import requests
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
log = logging.getLogger(__name__)
def search_serper(api_key: str, query: str, count: int, filter_list: Optional[list[str]] = None) -> list[SearchResult]:
def search_serper(api_key: str, query: str, count: int, filter_list: list[str | None] = None) -> list[SearchResult]:
"""Search using serper.dev's API and return the results as a list of SearchResult objects.
Args: