From ce4de1c73e93319e1d87719bbb98731dbc699681 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Thu, 19 Sep 2024 20:44:15 +0200 Subject: Use __str__ instead of __repr__ for pretty-printing WatchLaterEntry __repr__ is supposed to compute the "official" string representation of an object [1] and not a pretty-printed version, so use __str__ instead. [1] https://docs.python.org/3.12/reference/datamodel.html#object.__repr__ --- later | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/later b/later index 417e9f3..7d2f9d0 100755 --- a/later +++ b/later @@ -42,7 +42,7 @@ class WatchLaterEntry: path: str mtime: dt - def __repr__(self): + def __str__(self): def format_time(time): now = dt.now() if time < now - datetime.timedelta(days=7): -- cgit v1.2.3-2-gb3c3