From b7fd212c080e5db08b5f9eef118bfe815731bacd Mon Sep 17 00:00:00 2001 From: geetu040 Date: Mon, 26 Feb 2024 20:57:36 +0500 Subject: [PATCH] fix: Compression instead of grpc.Compression in type hint --- qdrant_client/async_qdrant_remote.py | 2 +- qdrant_client/qdrant_remote.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qdrant_client/async_qdrant_remote.py b/qdrant_client/async_qdrant_remote.py index 5aa24327..71953b89 100644 --- a/qdrant_client/async_qdrant_remote.py +++ b/qdrant_client/async_qdrant_remote.py @@ -112,7 +112,7 @@ def __init__( warnings.warn("Api key is used with unsecure connection.") self._rest_headers["api-key"] = api_key self._grpc_headers.append(("api-key", api_key)) - grpc_compression: Optional[grpc.Compression] = kwargs.pop("grpc_compression", None) + grpc_compression: Optional[Compression] = kwargs.pop("grpc_compression", None) if grpc_compression is not None and (not isinstance(grpc_compression, Compression)): raise TypeError( f"Expected 'grpc_compression' to be of type grpc.Compression or None, but got {type(grpc_compression).__name__}" diff --git a/qdrant_client/qdrant_remote.py b/qdrant_client/qdrant_remote.py index df7221af..a30a303f 100644 --- a/qdrant_client/qdrant_remote.py +++ b/qdrant_client/qdrant_remote.py @@ -128,7 +128,7 @@ def __init__( self._grpc_headers.append(("api-key", api_key)) # GRPC Channel-Level Compression - grpc_compression: Optional[grpc.Compression] = kwargs.pop("grpc_compression", None) + grpc_compression: Optional[Compression] = kwargs.pop("grpc_compression", None) if grpc_compression is not None and not isinstance(grpc_compression, Compression): raise TypeError( f"Expected 'grpc_compression' to be of type grpc.Compression or None, but got {type(grpc_compression).__name__}"