From eba2beccf609e8bdb38c750ec865352a692a3386 Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Sat, 2 Dec 2023 17:49:06 +0800 Subject: [PATCH] code format Signed-off-by: bigsheeper --- pymilvus/client/grpc_handler.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index a138d0f29..f93a1a2a7 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -1376,7 +1376,10 @@ def query( future = self._stub.Query.future(request, timeout=timeout) response = future.result() - if response.status.code == Status.EMPTY_COLLECTION or response.status.error_code == Status.EMPTY_COLLECTION: + if ( + response.status.code == Status.EMPTY_COLLECTION + or response.status.error_code == Status.EMPTY_COLLECTION + ): return [] if response.status.code != Status.SUCCESS or response.status.error_code != Status.SUCCESS: raise MilvusException( @@ -1887,7 +1890,10 @@ def _check(): def __internal_register(self, user: str, host: str, **kwargs) -> int: req = Prepare.register_request(user, host) response = self._stub.Connect(request=req) - if response.status.code != ErrorCode.SUCCESS or response.status.error_code != ErrorCode.SUCCESS: + if ( + response.status.code != ErrorCode.SUCCESS + or response.status.error_code != ErrorCode.SUCCESS + ): raise MilvusException( response.status.code, response.status.reason, response.status.error_code ) @@ -1898,7 +1904,10 @@ def __internal_register(self, user: str, host: str, **kwargs) -> int: def alloc_timestamp(self, timeout: Optional[float] = None) -> int: request = milvus_types.AllocTimestampRequest() response = self._stub.AllocTimestamp(request, timeout=timeout) - if response.status.code != ErrorCode.SUCCESS or response.status.error_code != ErrorCode.SUCCESS: + if ( + response.status.code != ErrorCode.SUCCESS + or response.status.error_code != ErrorCode.SUCCESS + ): raise MilvusException( response.status.code, response.status.reason, response.status.error_code )