From b3e4353792996946e98fcdb82bf84075ad26018e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Sat, 30 Dec 2023 13:44:54 +0545 Subject: [PATCH] objectdb: add __rich_repr__ --- src/dvc_objects/db.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dvc_objects/db.py b/src/dvc_objects/db.py index cc492cb..92b7e91 100644 --- a/src/dvc_objects/db.py +++ b/src/dvc_objects/db.py @@ -61,6 +61,11 @@ def __repr__(self): read_only = self.read_only return f"{self.__class__.__name__}({fs=!r}, {path=!r}, {read_only=!r})" + def __rich_repr__(self): + yield "fs", self.fs + yield "path", self.path + yield "read_only", self.read_only + def _init(self, dname: str) -> None: if self.read_only: return