Skip to content

Commit

Permalink
objectdb: add __rich_repr__ (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Dec 30, 2023
1 parent bbc8538 commit add14dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dvc_objects/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit add14dd

Please sign in to comment.