Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper committed Dec 2, 2023
1 parent 1f6fe81 commit eba2bec
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
)
Expand All @@ -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
)
Expand Down

0 comments on commit eba2bec

Please sign in to comment.