Skip to content

Commit cf0bc76

Browse files
authored
docs: use Google-style non-ORM docstrings (#3747)
Convert the remaining non-ORM reStructuredText docstrings in MilvusClient.list_indexes and the struct-field conversion helper to Google style. See also: #809 Signed-off-by: pymilvus-bot <pymilvus@zilliz.com>
1 parent c5e73a6 commit cf0bc76

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

pymilvus/client/utils.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,13 @@ def sparse_parse_single_row(data: bytes) -> SparseRowOutputType:
426426

427427

428428
def convert_struct_fields_to_user_format(struct_array_fields: List[Dict]) -> List[Dict]:
429-
"""
430-
Convert internal struct_array_fields representation to user-friendly format.
429+
"""Convert internal struct array fields to a user-friendly format.
430+
431+
Args:
432+
struct_array_fields (List[Dict]): Struct field information from the server.
431433
432-
:param struct_array_fields: List of struct field info from server
433-
:return: List of user-friendly field dictionaries
434+
Returns:
435+
List[Dict]: User-friendly field dictionaries.
434436
"""
435437
converted_fields = []
436438

pymilvus/milvus_client/milvus_client.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,18 +1081,15 @@ def refresh_load(self, collection_name: str, timeout: Optional[float] = None, **
10811081
)
10821082

10831083
def list_indexes(self, collection_name: str, field_name: Optional[str] = "", **kwargs):
1084-
"""List all indexes of collection. If `field_name` is not specified,
1085-
return all the indexes of this collection, otherwise this interface will return
1086-
all indexes on this field of the collection.
1084+
"""List indexes in a collection.
10871085
1088-
:param collection_name: The name of collection.
1089-
:type collection_name: str
1090-
1091-
:param field_name: The name of field. If no field name is specified, all indexes
1092-
of this collection will be returned.
1086+
Args:
1087+
collection_name (str): The name of the collection.
1088+
field_name (str, optional): The name of the field. If omitted, indexes for all
1089+
fields are returned. Defaults to "".
10931090
1094-
:return: The name list of all indexes.
1095-
:rtype: str list
1091+
Returns:
1092+
List[str]: The names of the indexes.
10961093
"""
10971094
conn = self._get_connection()
10981095
indexes = conn.list_indexes(

0 commit comments

Comments
 (0)