Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
Signed-off-by: shaoting-huang <[email protected]>
  • Loading branch information
shaoting-huang committed Nov 20, 2024
1 parent e1adbc2 commit b2f525d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,7 @@ def revoke_privilege(
)
resp = self._stub.OperatePrivilege(req, wait_for_ready=True, timeout=timeout)
check_status(resp)

@retry_on_rpc_failure()
def grant_privilege_v2(
self,
Expand Down
6 changes: 3 additions & 3 deletions pymilvus/milvus_client/milvus_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ def revoke_privilege(
conn.revoke_privilege(
role_name, object_type, object_name, privilege, db_name, timeout=timeout, **kwargs
)

def grant_privilege_v2(
self,
role_name: str,
Expand All @@ -1014,7 +1014,7 @@ def grant_privilege_v2(
):
conn = self._get_connection()
conn.grant_privilege_v2(
role_name, privilege, db_name, collection_name,timeout=timeout, **kwargs
role_name, privilege, db_name, collection_name, timeout=timeout, **kwargs
)

def revoke_privilege_v2(
Expand All @@ -1028,7 +1028,7 @@ def revoke_privilege_v2(
):
conn = self._get_connection()
conn.revoke_privilege(
role_name, privilege, db_name, collection_name,timeout=timeout, **kwargs
role_name, privilege, db_name, collection_name, timeout=timeout, **kwargs
)

def create_alias(
Expand Down
4 changes: 2 additions & 2 deletions pymilvus/orm/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def grant_v2(self, privilege: str, db_name: str, collection_name: str):
>>> from pymilvus.orm.role import Role
>>> connections.connect()
>>> role = Role(role_name)
>>> role.grant_v2("Insert", db_name, collection_name)
>>> role.grant_v2("Insert", db_name, collection_name)
"""
return self._get_connection().grant_privilege_v2(
self._name, privilege, db_name, collection_name
Expand All @@ -210,7 +210,7 @@ def revoke_v2(self, privilege: str, db_name: str, collection_name: str):
>>> from pymilvus.orm.role import Role
>>> connections.connect()
>>> role = Role(role_name)
>>> role.revoke_v2("Insert", db_name, collection_name)
>>> role.revoke_v2("Insert", db_name, collection_name)
"""
return self._get_connection().revoke_privilege_v2(
self._name, privilege, db_name, collection_name
Expand Down

0 comments on commit b2f525d

Please sign in to comment.