Skip to content

Commit ca34322

Browse files
committed
PYTHON-4834 Add __repr__ to IndexModel
- use .format()
1 parent 09ef323 commit ca34322

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymongo/operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,12 +774,12 @@ def document(self) -> dict[str, Any]:
774774
return self.__document
775775

776776
def __repr__(self) -> str:
777-
im = "%s(%s%s)" % (
777+
im = "{}({}{})".format(
778778
self.__class__.__name__,
779779
self.document["key"],
780780
"".join(
781781
[
782-
", %s=%r" % (key, value)
782+
", {}={!r}".format(key, value)
783783
for key, value in self.document.items()
784784
if not key == "key"
785785
]

0 commit comments

Comments
 (0)