mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-01 07:03:02 +00:00
fix(valkey): keep basedpyright arg-type budget green after main merge
The from_url client's return type is unknown under the types-redis 4.6 stubs, so raw_result reaches _to_response as an unknown-typed argument. Suppress reportUnknownArgumentType on those two returns, matching the existing stub-gap ignores on the same calls. No runtime change. Signed-off-by: Jonathan Neufeld <jonathan.neufeld@improving.com>
This commit is contained in:
parent
c3c8c6754c
commit
4e4ff11bca
1 changed files with 2 additions and 2 deletions
|
|
@ -254,7 +254,7 @@ class ValkeyVectorStoreConfig(BaseDirectVectorStoreConfig):
|
|||
)
|
||||
try:
|
||||
raw_result: Final = client.ft(vector_store_id).search(knn, query_params=vec_params)
|
||||
return self._to_response(raw_result, query_text, params.text_field)
|
||||
return self._to_response(raw_result, query_text, params.text_field) # pyright: ignore[reportUnknownArgumentType] # raw_result flows from the from_url client whose return type the types-redis 4.6 stubs leave unknown; the shape is validated inside _to_response
|
||||
finally:
|
||||
client.close()
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ class ValkeyVectorStoreConfig(BaseDirectVectorStoreConfig):
|
|||
raw_result: Final = await client.ft(vector_store_id).search( # pyright: ignore[reportGeneralTypeIssues] # types-redis 4.6 stubs shadow redis 5.3.1 and type the async client's ft() as the sync Search, so search() returns a non-awaitable Result; it is a coroutine at runtime
|
||||
knn, query_params=vec_params
|
||||
)
|
||||
return self._to_response(raw_result, query_text, params.text_field)
|
||||
return self._to_response(raw_result, query_text, params.text_field) # pyright: ignore[reportUnknownArgumentType] # raw_result flows from the from_url client whose return type the types-redis 4.6 stubs leave unknown; the shape is validated inside _to_response
|
||||
finally:
|
||||
await client.aclose()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue