mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-11 08:38:24 +00:00
fix(ci): repair Python 3.10 syntax, import sorting, and coverage matrix
Resolves failing CI jobs on PR #1 by: 1. Removing nested quotes inside f-strings for Python 3.10 compatibility. 2. Fixing I001 import-sorting violation in utils.py via ruff format. 3. Appending the missing 'tests/unit/llms/serpapi' test path to the CI shard matrix in main.yml to satisfy assert-ci-coverage.
This commit is contained in:
parent
89712b2dcb
commit
18e9e6e0ca
3 changed files with 8 additions and 3 deletions
1
.github/workflows/test-unit.yml
vendored
1
.github/workflows/test-unit.yml
vendored
|
|
@ -340,6 +340,7 @@ jobs:
|
|||
tests/unit/llms/searchapi
|
||||
tests/unit/llms/searxng
|
||||
tests/unit/llms/serper
|
||||
tests/unit/llms/serpapi
|
||||
tests/unit/llms/snowflake
|
||||
tests/unit/llms/soniox
|
||||
tests/unit/llms/stability
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class SerpApiSearchConfig(BaseSearchConfig):
|
|||
|
||||
domains: Final = optional_params.get("search_domain_filter")
|
||||
q_final: Final = (
|
||||
f"({q_str}) ({" OR ".join(f"site:{d}" for d in domains)})" # pyright: ignore[reportUnknownVariableType] # items are strings
|
||||
f"({q_str}) ({' OR '.join(f'site:{d}' for d in domains)})" # pyright: ignore[reportUnknownVariableType] # items are strings
|
||||
if isinstance(domains, list) and len(domains) > 0 # pyright: ignore[reportUnknownArgumentType] # domains is a list
|
||||
else q_str
|
||||
)
|
||||
|
|
@ -135,7 +135,11 @@ class SerpApiSearchConfig(BaseSearchConfig):
|
|||
and param not in optional_mappings
|
||||
}
|
||||
|
||||
request_data: Final[dict[str, object]] = {**base_params, **optional_mappings, **extra_params} # mutable-ok: mapping type
|
||||
request_data: Final[dict[str, object]] = { # mutable-ok: mapping type
|
||||
**base_params,
|
||||
**optional_mappings,
|
||||
**extra_params,
|
||||
}
|
||||
|
||||
return {"_serpapi_params": request_data}
|
||||
|
||||
|
|
|
|||
|
|
@ -9949,8 +9949,8 @@ class ProviderConfigManager:
|
|||
from litellm.llms.perplexity.search.transformation import PerplexitySearchConfig
|
||||
from litellm.llms.searchapi.search.transformation import SearchAPIConfig
|
||||
from litellm.llms.searxng.search.transformation import SearXNGSearchConfig
|
||||
from litellm.llms.serper.search.transformation import SerperSearchConfig
|
||||
from litellm.llms.serpapi.search.transformation import SerpApiSearchConfig
|
||||
from litellm.llms.serper.search.transformation import SerperSearchConfig
|
||||
from litellm.llms.tavily.search.transformation import TavilySearchConfig
|
||||
from litellm.llms.tinyfish.search.transformation import TinyfishSearchConfig
|
||||
from litellm.llms.you_com.search.transformation import YouComSearchConfig
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue