Skip to content

Commit ca15e9d

Browse files
committed
fix: lint, format and use typing package
Signed-off-by: chyezh <[email protected]>
1 parent e6d8628 commit ca15e9d

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

pymilvus/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
from .orm.schema import CollectionSchema, FieldSchema
5858
from .orm.utility import (
5959
create_resource_group,
60-
update_resource_groups,
6160
create_user,
6261
delete_user,
6362
describe_resource_group,
@@ -79,6 +78,7 @@
7978
transfer_node,
8079
transfer_replica,
8180
update_password,
81+
update_resource_groups,
8282
wait_for_index_building_complete,
8383
wait_for_loading_complete,
8484
)
@@ -107,6 +107,7 @@
107107
"reset_password",
108108
"create_user",
109109
"update_password",
110+
"update_resource_groups",
110111
"delete_user",
111112
"list_usernames",
112113
"SearchResult",
@@ -127,7 +128,6 @@
127128
"MilvusUnavailableException",
128129
"BulkInsertState",
129130
"create_resource_group",
130-
"update_resource_groups",
131131
"drop_resource_group",
132132
"describe_resource_group",
133133
"list_resource_groups",

pymilvus/client/grpc_handler.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
import socket
55
import time
66
from pathlib import Path
7-
from typing import Any, Callable, Dict, List, Optional, Union
7+
from typing import Any, Callable, Dict, List, Optional, Union, Mapping
88
from urllib import parse
9-
from collections.abc import Mapping
109

1110
import grpc
1211
from grpc._cython import cygrpc
@@ -50,8 +49,8 @@
5049
LoadState,
5150
Plan,
5251
Replica,
53-
ResourceGroupInfo,
5452
ResourceGroupConfig,
53+
ResourceGroupInfo,
5554
RoleInfo,
5655
Shard,
5756
State,

pymilvus/client/prepare.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import base64
22
import datetime
3-
from typing import Any, Dict, Iterable, List, Optional, Union
4-
from collections.abc import Mapping
3+
from typing import Any, Dict, Iterable, List, Optional, Union, Mapping
54

65
import numpy as np
76

pymilvus/client/stub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pymilvus.decorators import deprecated
44
from pymilvus.exceptions import MilvusException, ParamError
55
from pymilvus.settings import Config
6-
from collections.abc import Mapping
6+
from typing import Mapping
77

88
from .check import is_legal_host, is_legal_port
99
from .grpc_handler import GrpcHandler

pymilvus/client/types.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,8 +862,10 @@ def hostname(self) -> str:
862862
Attributes:
863863
requests (ResourceGroupLimit): The requests of the resource group.
864864
limits (ResourceGroupLimit): The limits of the resource group.
865-
transfer_from (List[ResourceGroupTransfer]): The transfer config that resource group can transfer node from the resource group of this field at high priority.
866-
transfer_to (List[ResourceGroupTransfer]): The transfer config that resource group can transfer node to the resource group of this field at high priority.
865+
transfer_from (List[ResourceGroupTransfer]): The transfer config that resource group
866+
can transfer node from the resource group of this field at high priority.
867+
transfer_to (List[ResourceGroupTransfer]): The transfer config that resource group
868+
can transfer node to the resource group of this field at high priority.
867869
Example:
868870
ResourceGroupConfig(
869871
requests={"node_num": 1},

pymilvus/orm/utility.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
# the License.
1212

1313
from datetime import datetime, timedelta, timezone
14-
from typing import List, Optional
15-
from collections.abc import Mapping
14+
from typing import List, Optional, Mapping
1615

1716
from pymilvus.client.types import (
1817
BulkInsertState,

0 commit comments

Comments
 (0)