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:
Jonathan Neufeld 2026-10-01 12:41:30 -06:00
parent c3c8c6754c
commit 4e4ff11bca
No known key found for this signature in database

View file

@ -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()