refac: modernize imports, standardize type hints and docstrings

This commit is contained in:
Timothy Jaeryang Baek
2026-05-12 06:30:38 +09:00
parent 998c86a52b
commit a59c967d7e
16 changed files with 118 additions and 142 deletions
@@ -1,17 +1,17 @@
from __future__ import annotations
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_serpstack(
api_key: str,
query: str,
count: int,
filter_list: Optional[list[str]] = None,
filter_list: list[str | None] = None,
https_enabled: bool = True,
) -> list[SearchResult]:
"""Search using serpstack.com's and return the results as a list of SearchResult objects.