Nicer item repr (#2655)

This commit is contained in:
William FH
2024-12-05 10:52:44 -08:00
committed by GitHub
parent a275ab26d3
commit 0f0e31df24
@@ -80,13 +80,16 @@ class Item:
def dict(self) -> dict:
return {
"value": self.value,
"key": self.key,
"namespace": list(self.namespace),
"key": self.key,
"value": self.value,
"created_at": self.created_at.isoformat(),
"updated_at": self.updated_at.isoformat(),
}
def __repr__(self) -> str:
return f"Item({', '.join(f'{k}={v!r}' for k, v in self.dict().items())})"
class SearchItem(Item):
"""Represents an item returned from a search operation with additional metadata."""