From add14dde1b71a118071e4efc660b5a1877023e68 Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Sat, 30 Dec 2023 13:53:37 +0545 Subject: [PATCH] objectdb: add __rich_repr__ (#267) --- 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