From 4351db05927c4a7f15a15be3ddc63a8c447a4994 Mon Sep 17 00:00:00 2001 From: SimFG Date: Fri, 17 May 2024 10:57:33 +0800 Subject: [PATCH] [2.4] fix the str function of the extra list (#2098) /kind improvement issue: https://github.com/milvus-io/milvus/issues/30436 link pr: #2092 Signed-off-by: SimFG --- pymilvus/client/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymilvus/client/types.py b/pymilvus/client/types.py index 00b653602..d1f83377f 100644 --- a/pymilvus/client/types.py +++ b/pymilvus/client/types.py @@ -933,7 +933,7 @@ def __init__(self, *args, extra: Optional[Dict] = None, **kwargs) -> None: def __str__(self) -> str: """Only print at most 10 query results""" - return f"data: {list(map(str, self[:10]))} {'...' if len(self) else ''}, extra_info: {self.extra}" + return f"data: {list(map(str, self[:10]))} {'...' if len(self) > 10 else ''}, extra_info: {self.extra}" __repr__ = __str__