Skip to content

Commit

Permalink
upath._stat: add repr to UPathStatResult
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Feb 10, 2024
1 parent 17e08b2 commit de016ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions upath/_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ def __init__(
self._seq = seq[: self.n_sequence_fields]
self._info = info_dict or {}

def __repr__(self):
cls_name = type(self).__name__
seq_attrs = ", ".join(map("{0[0]}={0[1]}".format, zip(self._fields, self)))
return f"{cls_name}({seq_attrs}, info={self._info!r})"

# --- access to the fsspec info dict ------------------------------

@classmethod
Expand Down

0 comments on commit de016ea

Please sign in to comment.