aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWolfgang Müller2024-09-19 20:44:15 +0200
committerWolfgang Müller2024-09-19 20:44:15 +0200
commitce4de1c73e93319e1d87719bbb98731dbc699681 (patch)
treefc203b07e5bc99dd29a2a40408fd0a62c2ea9a71
parentf6c418b0974f3cc70ac9685bbec67e0e6d797b9f (diff)
downloadlater-ce4de1c73e93319e1d87719bbb98731dbc699681.tar.gz
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__
Diffstat (limited to '')
-rwxr-xr-xlater2
1 files changed, 1 insertions, 1 deletions
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):