Skip to content

Commit

Permalink
fix: Compression instead of grpc.Compression in type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
geetu040 committed Feb 26, 2024
1 parent 7d16293 commit b7fd212
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qdrant_client/async_qdrant_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__}"
Expand Down
2 changes: 1 addition & 1 deletion qdrant_client/qdrant_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__}"
Expand Down

0 comments on commit b7fd212

Please sign in to comment.