From c87b21cc3ec79c9cb4af21c279a9ff4519a7e25d Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Thu, 7 Nov 2024 10:24:18 +0800 Subject: [PATCH] Corrected grammar and consistency in error messages (#2289) (#2330) 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. Signed-off-by: zhenshan.cao Co-authored-by: Ahmet Yasin Aytar <34247619+Ahmetyasin@users.noreply.github.com> --- 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 4c141d90d..0abe6fe0b 100644 --- a/pymilvus/orm/schema.py +++ b/pymilvus/orm/schema.py @@ -477,7 +477,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]): @@ -486,7 +486,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] @@ -499,7 +499,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}" )