Skip to content

Commit 565fed6

Browse files
committed
remote NoReturn
Signed-off-by: yangxuan <[email protected]>
1 parent 51c6c12 commit 565fed6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pymilvus/client/asynch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import abc
22
import inspect
33
import threading
4-
from typing import Any, Callable, NoReturn, Optional
4+
from typing import Any, Callable, Optional
55

66
from pymilvus.exceptions import MilvusException
77
from pymilvus.grpc_gen import milvus_pb2
@@ -26,7 +26,7 @@ def _parameter_is_empty(func: Callable):
2626

2727
class AbstractFuture:
2828
@abc.abstractmethod
29-
def result(self, **kwargs) -> NoReturn:
29+
def result(self, **kwargs) -> Any:
3030
"""Return deserialized result.
3131
3232
It's a synchronous interface. It will wait executing until
@@ -37,15 +37,15 @@ def result(self, **kwargs) -> NoReturn:
3737
raise NotImplementedError
3838

3939
@abc.abstractmethod
40-
def cancel(self) -> NoReturn:
40+
def cancel(self) -> None:
4141
"""Cancle gRPC future.
4242
4343
This API is thread-safe.
4444
"""
4545
raise NotImplementedError
4646

4747
@abc.abstractmethod
48-
def done(self) -> NoReturn:
48+
def done(self) -> None:
4949
"""Wait for request done.
5050
5151
This API is thread-safe.
@@ -82,7 +82,7 @@ def __del__(self) -> None:
8282
self._future = None
8383

8484
@abc.abstractmethod
85-
def on_response(self, response: Callable) -> NoReturn:
85+
def on_response(self, response: Callable) -> None:
8686
"""Parse response from gRPC server and return results."""
8787
raise NotImplementedError
8888

pymilvus/client/prepare.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import base64
22
import datetime
33
import json
4-
from typing import Any, Dict, Iterable, List, Mapping, NoReturn, Optional, Union
4+
from typing import Any, Dict, Iterable, List, Mapping, Optional, Union
55

66
import numpy as np
77
import ujson
@@ -429,7 +429,7 @@ def get_load_state(
429429
return req
430430

431431
@classmethod
432-
def empty(cls) -> NoReturn:
432+
def empty(cls) -> None:
433433
msg = "no empty request later"
434434
raise DeprecationWarning(msg)
435435

0 commit comments

Comments
 (0)