Skip to content

Commit 2a2ba89

Browse files
Ahmetyasinczs007
authored andcommitted
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.
1 parent fadc01b commit 2a2ba89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymilvus/orm/schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ def _check_insert_data(data: Union[List[List], pd.DataFrame]):
477477
is_dataframe = isinstance(data, pd.DataFrame)
478478
for col in data:
479479
if not is_dataframe and not is_list_like(col):
480-
raise DataTypeNotSupportException(message="data should be a list of list")
480+
raise DataTypeNotSupportException(message="The data should be a list of list")
481481

482482

483483
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]):
486486
data_cnt = len(data.columns) if is_dataframe else len(data)
487487
if field_cnt != data_cnt:
488488
message = (
489-
f"The data don't match with schema fields, expect {field_cnt} list, got {len(data)}"
489+
f"The data doesn't match with schema fields, expect {field_cnt} list, got {len(data)}"
490490
)
491491
if is_dataframe:
492492
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]):
499499
for x, y in zip(list(data.columns), fields):
500500
if x != y.name:
501501
raise DataNotMatchException(
502-
message=f"The name of field don't match, expected: {y.name}, got {x}"
502+
message=f"The name of field doesn't match, expected: {y.name}, got {x}"
503503
)
504504

505505

0 commit comments

Comments
 (0)