From 650f7cdf15816dc85dcea53de65d1a1a9b8f5a1c Mon Sep 17 00:00:00 2001 From: Ahmet Yasin Aytar <34247619+Ahmetyasin@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:30:36 +0300 Subject: [PATCH] Corrected grammar and consistency in error messages (#2289) This PR updates several error messages for grammar and clarity. The changes include: Corrected "data should be a list of list" to "The data should be a list of lists" for better readability. Fixed grammar in "The data don't match with schema fields" to "The data doesn't match with schema fields." Corrected field name mismatch message from "The name of field don't match" to "The name of the field doesn't match." These improvements enhance the clarity and professionalism of error messages in the codebase. --- pymilvus/orm/schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pymilvus/orm/schema.py b/pymilvus/orm/schema.py index 9c69ea741..d45bb27df 100644 --- a/pymilvus/orm/schema.py +++ b/pymilvus/orm/schema.py @@ -707,7 +707,7 @@ def _check_insert_data(data: Union[List[List], pd.DataFrame]): is_dataframe = isinstance(data, pd.DataFrame) for col in data: if not is_dataframe and not is_list_like(col): - raise DataTypeNotSupportException(message="data should be a list of list") + raise DataTypeNotSupportException(message="The data should be a list of list") def _check_data_schema_cnt(fields: List, data: Union[List[List], pd.DataFrame]): @@ -716,7 +716,7 @@ def _check_data_schema_cnt(fields: List, data: Union[List[List], pd.DataFrame]): data_cnt = len(data.columns) if is_dataframe else len(data) if field_cnt != data_cnt: message = ( - f"The data don't match with schema fields, expect {field_cnt} list, got {len(data)}" + f"The data doesn't match with schema fields, expect {field_cnt} list, got {len(data)}" ) if is_dataframe: i_name = [f.name for f in fields] @@ -729,7 +729,7 @@ def _check_data_schema_cnt(fields: List, data: Union[List[List], pd.DataFrame]): for x, y in zip(list(data.columns), fields): if x != y.name: raise DataNotMatchException( - message=f"The name of field don't match, expected: {y.name}, got {x}" + message=f"The name of field doesn't match, expected: {y.name}, got {x}" )