From a5e5719d1d063171485024f6bcecce0128e075a6 Mon Sep 17 00:00:00 2001 From: SjjThaler Date: Fri, 11 Jul 2025 13:27:18 +0200 Subject: [PATCH] Silence mypy valid-type error --- llama_stack/distribution/library_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llama_stack/distribution/library_client.py b/llama_stack/distribution/library_client.py index cebfabba5..b9efdf6ff 100644 --- a/llama_stack/distribution/library_client.py +++ b/llama_stack/distribution/library_client.py @@ -392,8 +392,9 @@ class AsyncLlamaStackAsLibraryClient(AsyncLlamaStackClient): # we use asynchronous impl always internally and channel all requests to AsyncLlamaStackClient # however, the top-level caller may be a SyncAPIClient -- so its stream_cls might be a Stream (SyncStream) # so we need to convert it to AsyncStream + # mypy can't track runtime variables inside the [...] of a generic, so ignore that check args = get_args(stream_cls) - stream_cls = AsyncStream[args[0]] + stream_cls = AsyncStream[args[0]] # type: ignore[valid-type] response = AsyncAPIResponse( raw=mock_response, client=self,