Skip to content

Commit

Permalink
[2.4] fix the str function of the extra list (#2098)
Browse files Browse the repository at this point in the history
/kind improvement
issue: milvus-io/milvus#30436
link pr: #2092

Signed-off-by: SimFG <bang.fu@zilliz.com>
  • Loading branch information
SimFG committed May 17, 2024
1 parent 7520087 commit 4351db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymilvus/client/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__

Expand Down

0 comments on commit 4351db0

Please sign in to comment.