Skip to content

Commit f21ec55

Browse files
committed
PYTHON-4834 Add __repr__ to IndexModel
1 parent ac198af commit f21ec55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pymongo/operations.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,9 @@ def document(self) -> dict[str, Any]:
773773
"""
774774
return self.__document
775775

776+
def __repr__(self) -> str:
777+
return f"{self.__class__.__name__}({self.__document})"
778+
776779

777780
class SearchIndexModel:
778781
"""Represents a search index to create."""

0 commit comments

Comments
 (0)